public void PlayerLandsOnUnownedRailRoad_PurchasesIt() { var cashBeforeVisit = banker.GetPlayerBalance(player); shortLineRailRoad.Land(player); Assert.AreEqual(((IOwnableProperty)shortLineRailRoad).Price, cashBeforeVisit - banker.GetPlayerBalance(player)); Assert.IsTrue(player.OwnsProperty(shortLineRailRoad)); }
public void CalculatePaymentOneOwned() { var expectedPayment = 25; railRoad1.Land(owner); var actualPayment = railRoad1.CalculatePayment(player); Assert.AreEqual(expectedPayment, actualPayment); }
public void PlayerLandsOnOwnedRailRoadPaysRent() { pennsylvaniaRailRoad.Land(game.CreatePlayerAccount("Horse")); var cashBeforeVisit = banker.GetPlayerBalance(player); pennsylvaniaRailRoad.Land(player); Assert.AreEqual(25, cashBeforeVisit - banker.GetPlayerBalance(player)); Assert.IsFalse(player.OwnsProperty(pennsylvaniaRailRoad)); }
public void CalculatePayementThreeOwned() { var expectedPayment = 100; railRoad1.Land(owner); railRoad2.Land(owner); railRoad3.Land(owner); var actualPayment = railRoad1.CalculatePayment(player); Assert.AreEqual(expectedPayment, actualPayment); }
public void FourRailRoadsOwned_PlayerPays200Dollars() { readingRailRoad.Land(horse); pennsylvaniaRailRoad.Land(horse); bAndORailRoad.Land(horse); shortLineRailRoad.Land(horse); var cashBeforeLand = banker.GetPlayerBalance(player); readingRailRoad.Land(player); Assert.AreEqual(200, cashBeforeLand - banker.GetPlayerBalance(player)); }