Esempio n. 1
0
        public void FieldWithCity_BuyHotel_PlayerHaveNotEnoughtMoney_BuyHotelReturnFalse()
        {
            var field  = new FieldWithCity("Brazylia", 1000, 1000);
            var player = new Player(1, "", "kamil", 1000, new Pawn("Red", 1, 0));

            field.BuyField(player);
            field.BuyHome(player);
            field.BuyHome(player);
            field.BuyHome(player);
            field.BuyHotel(player);
            Assert.False(field.BuyHotel(player));
        }
Esempio n. 2
0
        public void FieldWithCity_BuyHotel_PlayerHaveNotEnoughtMoney_FieldIsNotHotel()
        {
            var field  = new FieldWithCity("Brazylia", 1000, 1000);
            var player = new Player(1, "", "kamil", 1000, new Pawn("Red", 1, 0));

            field.BuyField(player);
            field.BuyHome(player);
            field.BuyHome(player);
            field.BuyHome(player);
            field.BuyHotel(player);
            Assert.AreNotEqual(field.GetFieldState, FieldState.Hotel);
        }
Esempio n. 3
0
        public void FieldWithCity_BuyHotel_PlayerHaveNotEnoughtMoney_FieldCostNotIncrease()
        {
            var field  = new FieldWithCity("Brazylia", 1000, 1000);
            var player = new Player(1, "", "kamil", 1000, new Pawn("Red", 1, 0));

            field.BuyField(player);
            field.BuyHome(player);
            field.BuyHome(player);
            field.BuyHome(player);
            field.BuyHotel(player);
            Assert.AreEqual(field.FieldCost, 1000);
        }
Esempio n. 4
0
        public void FieldWithCity_BuyHotel_PlayerHaveEnoughtMoney_PlayerSpendMoney()
        {
            var field  = new FieldWithCity("Brazylia", 1000, 1000);
            var player = new Player(1, "", "kamil", 11000, new Pawn("Red", 1, 0));

            field.BuyField(player);
            field.BuyHome(player);
            field.BuyHome(player);
            field.BuyHome(player);
            field.BuyHotel(player);
            Assert.AreEqual(player.Money, 0);
        }