diff --git a/MerchantRPGCSE2102/src/tests/testMerchant.java b/MerchantRPGCSE2102/src/tests/testMerchant.java deleted file mode 100644 index 342dbb4..0000000 --- a/MerchantRPGCSE2102/src/tests/testMerchant.java +++ /dev/null @@ -1,56 +0,0 @@ -package tests; - -import game.Merchant; -import junit.framework.TestCase; - - -public class testMerchant extends TestCase -{ - private Merchant m; - - public void setup() - { - m = new Merchant("Test", 100, 2); - } - - //testing cash system - public void testCashSystem() throws Exception - { - setup(); - assertEquals(-1, m.decrementCash(101)); - m.incrementCash(100); - m.refreshCash(); - assertEquals(200, m.getCurrentCash()); - m.decrementCash(120); - assertEquals(80, m.getCurrentCash()); - } - - //testing randomizer - public void testRandomizer() throws Exception - { - setup(); - boolean testCheck = false; - m.setDailyRandomPrice(10, 50); - - if(10 <= m.getRandomPrice() && 50 >= m.getRandomPrice()) - { - testCheck = true; - } - - assertEquals(true, testCheck); - } - - //testing inventory - public void testInventory() throws Exception - { - setup(); - assertEquals(2, m.getInventory().length); - } - - //testing name - public void testName() throws Exception - { - setup(); - assertEquals("Test", m.getName()); - } -}