parent
e6eef8899f
commit
1810409047
@ -0,0 +1,11 @@
|
|||||||
|
package data;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import data.StockType;
|
||||||
|
|
||||||
|
public class Nasdaq extends StockType {
|
||||||
|
public Nasdaq() {
|
||||||
|
super();
|
||||||
|
name = "NASDAQ";
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
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"));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
import data.StypeMap;
|
||||||
|
import data.StockType;
|
||||||
|
import data.Nyse;
|
||||||
|
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 NyseTest {
|
||||||
|
private StypeMap smap;
|
||||||
|
private StockType nyyyse;
|
||||||
|
|
||||||
|
@BeforeEach
|
||||||
|
public void runBefore() {
|
||||||
|
smap = new StypeMap();
|
||||||
|
nyyyse = smap.getStype("Nyse");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testName() {
|
||||||
|
assertTrue(nyyyse.getName().equals("NYSE"));
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in new issue