コード例 #1
0
        public void FieldWithCity_BuyField_PlayerDontHaveEnoughtMoney()
        {
            var field  = new FieldWithCity("Brazylia", 1000, 1000);
            var player = new Player(1, "", "kamil", 500, new Pawn("Red", 1, 0));

            Assert.False(field.BuyField(player));
        }
コード例 #2
0
        public void FieldWithCity_BuyField()
        {
            var field  = new FieldWithCity("Brazylia", 1000, 1000);
            var player = new Player(1, "", "kamil", 1000, new Pawn("Red", 1, 0));

            Assert.True(field.BuyField(player));
        }
コード例 #3
0
        public void FieldWithCity_BuyHome_PlayerHaveNotEnoughtMoney_BuyHomeReturnFalse()
        {
            var field  = new FieldWithCity("Brazylia", 1000, 1000);
            var player = new Player(1, "", "kamil", 1000, new Pawn("Red", 1, 0));

            field.BuyField(player);
            Assert.False(field.BuyHome(player));
        }
コード例 #4
0
        public void FieldWithCity_BuyField_OwerIsPlayer()
        {
            var field  = new FieldWithCity("Brazylia", 1000, 1000);
            var player = new Player(1, "", "kamil", 1000, new Pawn("Red", 1, 0));

            field.SetOwer(player);
            Assert.False(field.BuyField(player));
        }
コード例 #5
0
        public void FieldWithCity_BuyHome_PlayerHaveNotEnoughtMoney_FieldIsEmptyField()
        {
            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);
            Assert.AreEqual(field.GetFieldState, FieldState.EmptyField);
        }
コード例 #6
0
        public void FieldWithCity_BuyHome_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);
            Assert.AreEqual(field.FieldCost, 1000);
        }
コード例 #7
0
        public void FieldWithCity_BuyHome_PlayerHaveNotEnoughtMoney_PlayerSpendMony()
        {
            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);
            Assert.AreEqual(player.Money, 0);
        }