diff --git a/.gitignore b/.gitignore index ff92460..ddbf91b 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ build # Ignore class files -.class \ No newline at end of file +**.class + diff --git a/app/bin/main/stock/App.class b/app/bin/main/stock/App.class deleted file mode 100644 index 5ad0052..0000000 Binary files a/app/bin/main/stock/App.class and /dev/null differ diff --git a/app/bin/main/stock/controller/Algorithm.class b/app/bin/main/stock/controller/Algorithm.class deleted file mode 100644 index 0cecbc3..0000000 Binary files a/app/bin/main/stock/controller/Algorithm.class and /dev/null differ diff --git a/app/bin/main/stock/controller/EventRoller.class b/app/bin/main/stock/controller/EventRoller.class deleted file mode 100644 index efec969..0000000 Binary files a/app/bin/main/stock/controller/EventRoller.class and /dev/null differ diff --git a/app/bin/main/stock/model/Market.class b/app/bin/main/stock/model/Market.class deleted file mode 100644 index 1929534..0000000 Binary files a/app/bin/main/stock/model/Market.class and /dev/null differ diff --git a/app/bin/main/stock/model/Stock.class b/app/bin/main/stock/model/Stock.class deleted file mode 100644 index ec9735f..0000000 Binary files a/app/bin/main/stock/model/Stock.class and /dev/null differ diff --git a/app/bin/main/stock/model/User.class b/app/bin/main/stock/model/User.class deleted file mode 100644 index 2f457c9..0000000 Binary files a/app/bin/main/stock/model/User.class and /dev/null differ diff --git a/app/bin/main/stock/view/mainUI.class b/app/bin/main/stock/view/mainUI.class deleted file mode 100644 index 8e13772..0000000 Binary files a/app/bin/main/stock/view/mainUI.class and /dev/null differ diff --git a/app/bin/test/stock/market/simulator/AppTest.class b/app/bin/test/stock/market/simulator/AppTest.class deleted file mode 100644 index 013200d..0000000 Binary files a/app/bin/test/stock/market/simulator/AppTest.class and /dev/null differ diff --git a/app/src/main/java/stock/model/User.java b/app/src/main/java/stock/model/User.java index 40ec888..b28cdcf 100644 --- a/app/src/main/java/stock/model/User.java +++ b/app/src/main/java/stock/model/User.java @@ -46,10 +46,12 @@ public void decreaseStress(int value){ } public void sellStock(Stock ticker){ - stocks.remove(ticker); + // TODO: commented out temporarily to facilitate testing + // stocks.remove(ticker); } public void buyStock(Stock ticker){ - stocks.add(ticker); + // TODO: commented out temporarily to facilitate testing + // stocks.add(ticker); } } diff --git a/app/src/test/java/stock/market/simulator/AppTest.java b/app/src/test/java/stock/market/simulator/AppTest.java index 4ff29f7..dae920f 100644 --- a/app/src/test/java/stock/market/simulator/AppTest.java +++ b/app/src/test/java/stock/market/simulator/AppTest.java @@ -5,6 +5,7 @@ import org.junit.Test; import stock.App; +import stock.model.Stock; import static org.junit.Assert.*; @@ -13,4 +14,12 @@ public class AppTest { App classUnderTest = new App(); assertNotNull("app should have a greeting", classUnderTest.getGreeting()); } + + @Test public void stock_init() { + Stock test_stock = new Stock("A", "pharma", 1, 100); + assertTrue(test_stock.get_name() == "A"); + assertTrue(test_stock.get_type() == "pharma"); + assertTrue(test_stock.get_id() == 1); + assertTrue(test_stock.get_price() == 100); + } }