Exemple #1
0
        public void GetPossibleSquads_AffiliationNull_ThrowsException()
        {
            var squadService = new SquadService(null);
            var roster       = BuildRoster();

            Assert.Throws <Exception>(() => squadService.GetPossibleSquads(roster, 15));
        }
Exemple #2
0
        public void GetPossibleSquads_SquadCount(IEnumerable <SquadMember> roster, int targetPoints, SquadOption squadOption, int expectedCount)
        {
            var squadService = new SquadService(TestData.Affiliations);
            var squads       = squadService.GetPossibleSquads(roster, targetPoints, squadOption);

            Assert.Equal(expectedCount, squads.Count());
        }
Exemple #3
0
        public void GetPossibleSquads_Not10Members_ThrowsException()
        {
            var squadService = new SquadService(TestData.Affiliations);
            var roster       = new SquadMember[]
            {
                new McpCharacter
                {
                    Name      = "Captain America",
                    PointCost = 4,
                    AlterEgo  = "Steve Rodgers"
                },
                new InfinityGem
                {
                    Name      = "Time Gem",
                    PointCost = 1
                }
            };

            Assert.Throws <ArgumentException>(() => squadService.GetPossibleSquads(roster, 15));
        }