You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
821 B
34 lines
821 B
package test;
|
|
|
|
import data.StypeMap;
|
|
import data.StockType;
|
|
import data.Nasdaq;
|
|
import org.junit.jupiter.api.BeforeEach;
|
|
import org.junit.jupiter.api.Test;
|
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
import static org.junit.jupiter.api.Assertions.assertFalse;
|
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
|
|
|
public class NasdaqTest {
|
|
private StypeMap smap;
|
|
private StockType naasdaq;
|
|
|
|
@BeforeEach
|
|
public void runBefore() {
|
|
smap = new StypeMap();
|
|
naasdaq = smap.getStype("Nasdaq");
|
|
}
|
|
|
|
@Test
|
|
public void testName() {
|
|
assertTrue(naasdaq.getName().equals("NASDAQ"));
|
|
}
|
|
|
|
@Test
|
|
public void testUpdate() {
|
|
double[] farray = naasdaq.update("1");
|
|
assertEquals(farray[0],0.0);
|
|
assertEquals(farray[1],0.0);
|
|
}
|
|
}
|