public void test_BriefDetailsToString() { Player play = new Player("Jim"); play.setBalance(1500); Property proper = new Property("Garden"); proper.setOwner(ref play); Board.access().addProperty(proper); //check first rolltheProp StringAssert.Contains("1500", play.BriefDetailsToString()); //second roll should not allow // Rolled double out of jail }
public void test_diceRollingToString() { Player thePlayer = new Player("Jim"); Property theProp = new Property("Gardend"); theProp.setOwner(ref thePlayer); Board.access().addProperty(theProp); //check first roll for (int diceroll = 0; diceroll < 5; diceroll++) StringAssert.Contains("Rolling Dice", thePlayer.diceRollingToString()); //second roll should not allow // Rolled double out of jail }
public void test_setLocation() { Player thePlayer = new Player("Jim"); Property theProp = new Property("Gardend"); theProp.setOwner(ref thePlayer); Board.access().addProperty(theProp); int boardS = Board.access().getSquares(); //expected to receive 200 for passingo decimal expected = thePlayer.getBalance() + 200; //Set player location thePlayer.setLocation(++boardS); //check first roll Assert.IsTrue(expected == thePlayer.getBalance()); //second roll should not allow // Rolled double out of jail }