示例#1
0
        public void BattleDummyCreatorDamageDealtTest()
        {
            var war     = CreateTestWar();
            var creator = new BattleDummyCreator();

            creator.AttackerBattleParticipants = 1;
            creator.SetWallHealth(0);

            var battle = creator.Create(war, true);

            Assert.IsTrue(battle.WallHealth < 0);
        }
示例#2
0
        public void BattleDummyCreatorProperParticipantsCountTest()
        {
            var war     = CreateTestWar();
            var creator = new BattleDummyCreator();

            creator.AttackerBattleParticipants = 5;
            creator.DefenderBattleParticipants = 10;

            var battle = creator.Create(war, true);

            Assert.AreEqual(5, battle.BattleParticipants.Where(p => p.IsAttacker).Count());
            Assert.AreEqual(10, battle.BattleParticipants.Where(p => p.IsAttacker == false).Count());
            Assert.AreEqual(15, battle.BattleParticipants.Count());
        }