예제 #1
0
        public void GetStandingsForLeague_NoTies_TeamsReturnedWithNoChange()
        {
            List <TeamLeague> basicLeagueStands = new List <TeamLeague>();

            basicLeagueStands.Add(new TeamLeague()
            {
                Id = 1, PointsLeague = 10
            });
            basicLeagueStands.Add(new TeamLeague()
            {
                Id = 2, PointsLeague = 9
            });
            basicLeagueStands.Add(new TeamLeague()
            {
                Id = 3, PointsLeague = 8
            });
            mockCompetitionRepository.GetBasicStandingsForLeague(1).ReturnsForAnyArgs(basicLeagueStands.AsQueryable());

            mockCompetitionRepository.DidNotReceiveWithAnyArgs().GetFixturesForTeamLeagues(null);

            var standings = competitionService.GetStandingsForLeague(1);

            Assert.That(standings[0].Id, Is.EqualTo(1));
            Assert.That(standings[1].Id, Is.EqualTo(2));
            Assert.That(standings[2].Id, Is.EqualTo(3));
        }