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.
32 lines
767 B
32 lines
767 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 StockType naasdaq;
|
|
|
|
@BeforeEach
|
|
public void runBefore() {
|
|
naasdaq = StypeMap.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);
|
|
}
|
|
}
|