Пример #1
0
 @Test
 public void takeResourceDoesntWorkWithNegativeNumbers() {
   Treasury t = new Treasury("Treasury", r);
   t.takeResource(Resource.GOLD, -20);
   assertEquals(t.getResourceAmount(Resource.GOLD), 100);
 }
Пример #2
0
 @Test
 public void takeResourceWontBringResourcesToNegative() {
   Treasury t = new Treasury("Treasury", r);
   t.takeResource(Resource.GOLD, 110);
   assertEquals(100, t.getResourceAmount(Resource.GOLD));
 }
Пример #3
0
 @Test
 public void takeResourceGetsGold() {
   Treasury t = new Treasury("Treasury", r);
   t.takeResource(Resource.GOLD, 20);
   assertEquals(t.getResourceAmount(Resource.GOLD), 80);
 }