Skip to content

Commit

Permalink
Minor additions, no real changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gavin Li committed Feb 2, 2015
1 parent dc693ce commit 5d94bdd
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions MerchantRPGCSE2102/src/tests/testMerchant.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public void setup()
m = new Merchant("Test", 100, 2);
}

//testing cash system
public void testCashSystem() throws Exception
{
setup();
Expand All @@ -24,12 +25,29 @@ public void testCashSystem() throws Exception
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();
Expand Down

0 comments on commit 5d94bdd

Please sign in to comment.