Exemplo n.º 1
0
 public void TestGetResourceRemaining()
 {
     var target = new Bank();
     Assert.AreEqual(target.getOreRemaining(), 19);
     Assert.AreEqual(target.getWoolRemaining(), 19);
     Assert.AreEqual(target.getLumberRemaining(), 19);
     Assert.AreEqual(target.getGrainRemaining(), 19);
     Assert.AreEqual(target.getBrickRemaining(), 19);
     Assert.AreEqual(target.getDevCardRemaining(), 25);
 }
Exemplo n.º 2
0
 public void TestModifyResource()
 {
     var target = new Bank();
     target.modifyResource("ore", -2);
     Assert.AreEqual(17, target.getOreRemaining());
     target.modifyResource("wool", -10);
     Assert.AreEqual(9, target.getWoolRemaining());
     target.modifyResource("lumber", -19);
     Assert.AreEqual(0, target.getLumberRemaining());
     target.modifyResource("grain", -19);
     target.modifyResource("grain", 5);
     Assert.AreEqual(5, target.getGrainRemaining());
     target.modifyResource("brick", -19);
     target.modifyResource("brick", 19);
     Assert.AreEqual(19, target.getBrickRemaining());
 }