예제 #1
0
        public void TestPlayerPaysRentValueWhenNotAllInGroupAreOwned()
        {
            baltic.LandedOnBy(playerOneId);

            baltic.LandedOnBy(playerTwoId);
            Assert.That(banker.GetBalanceFor(playerTwoId), Is.EqualTo(1496));
        }
예제 #2
0
        public void TestRentForOneRailroadOwnerIs25()
        {
            readingRailroad.LandedOnBy(playerOneId);
            readingRailroad.LandedOnBy(playerTwoId);

            Assert.That(banker.GetBalanceFor(playerTwoId), Is.EqualTo(1475));
        }
예제 #3
0
        public void TestUtilityRentWhenOneIsOwnedIs4TimesDiceRoll()
        {
            electric.LandedOnBy(playerOneId);

            dice.Roll();
            electric.LandedOnBy(playerTwoId);

            Assert.That(banker.GetBalanceFor(playerTwoId), Is.EqualTo(1460));
            Assert.That(banker.GetBalanceFor(playerOneId), Is.EqualTo(1390));
        }
예제 #4
0
 public void TestLandOnPlayerLandsOnOwnedPropertyAndNothingHappens()
 {
     mediterranean.LandedOnBy(playerId);
     mediterranean.LandedOnBy(playerId);
     Assert.That(banker.GetBalanceFor(playerId), Is.EqualTo(1440));
     Assert.That(mediterranean.OwnerId, Is.EqualTo(playerId));
 }
예제 #5
0
 private void SellPropertyToPlayerIfAffordable(Int32 playerId)
 {
     if (cost < banker.GetBalanceFor(playerId))
     {
         banker.CollectMoneyFrom(playerId, cost);
         OwnerId = playerId;
         IsOwned = true;
     }
 }
예제 #6
0
 public void TestPlayerPassesOverIncomeTaxAndUnownedPropertiesChangesNothing()
 {
     board.MovePlayerTo(playerId, 10);
     Assert.That(banker.GetBalanceFor(playerId), Is.EqualTo(1500));
 }
예제 #7
0
 public void TestPlayerPaysTaxBasedOnTaxEquation()
 {
     incomeTax.LandedOnBy(playerId);
     Assert.That(banker.GetBalanceFor(playerId), Is.EqualTo(1490));
 }