public void TestTwoParties()
        {
            var basicInfantry = CharacterFactory.GetBasicInfantry();
            var archer        = CharacterFactory.GetArcher();

            _sut.FilterAllowedBearerTypes(new List <IBMBCharacter>(new[] { archer, basicInfantry }));

            var firstParty = new PartyBuilder("firstParty")
                             .AddTroops(basicInfantry, 21)
                             .AddTroops(archer, 14)
                             .Build();

            var secondParty = new PartyBuilder("secondParty")
                              .AddTroops(basicInfantry, 14)
                              .AddTroops(archer, 14)
                              .Build();

            int bannersAdded = ProcessAgents(firstParty.Concat(secondParty));

            AssertBannerAddedTimes(5, bannersAdded);
        }
示例#2
0
        public void TestTwoParties()
        {
            var basicInfantry = CharacterFactory.GetBasicInfantry();
            var archer        = CharacterFactory.GetArcher();

            _sut.FilterAllowedBearerTypes(new List <ICharacter>(new[] { archer, basicInfantry }), false);

            var firstParty = new PartyBuilder("firstParty")
                             .AddTroops(basicInfantry, 21)
                             .AddTroops(archer, 14)
                             .Build();

            var secondParty = new PartyBuilder("secondParty")
                              .AddTroops(basicInfantry, 14)
                              .AddTroops(archer, 14)
                              .Build();

            foreach (var agent in firstParty.Concat(secondParty))
            {
                _sut.ProcessAgentOnBuild(agent, BattleType.FieldBattle);
            }

            Assert.Equal(5, _sut.AgentsThatShouldReceiveBanners.Count());
        }