public void RepoLeagueTestsGetLeagueByEndDate() { List <League> LeagueDB = new List <League> { new League { LeagueID = 0, GamesPerWeek = 2, EndDate = new DateTime(2016, 05, 02) }, new League { LeagueID = 1, GamesPerWeek = 1, GameTitle = "Halo", SeasonLength = 4, EndDate = new DateTime(2016, 05, 01) }, new League { LeagueID = 2, GamesPerWeek = 1, GameTitle = "COD", SeasonLength = 4, EndDate = new DateTime(2016, 05, 01) }, new League { LeagueID = 3, GamesPerWeek = 1, GameTitle = "Halo", SeasonLength = 5, EndDate = new DateTime(2016, 05, 02) } }; List <League> expected = new List <League> { new League { LeagueID = 1, GamesPerWeek = 1, GameTitle = "Halo", SeasonLength = 4, EndDate = new DateTime(2016, 05, 01) }, new League { LeagueID = 2, GamesPerWeek = 1, GameTitle = "COD", SeasonLength = 4, EndDate = new DateTime(2016, 05, 01) } }; _leagueSet.Object.AddRange(LeagueDB); ConnectMocksToDataStore(LeagueDB); List <League> actual = _repo.GetLeaguesByEndDate(new DateTime(2016, 05, 01)); CollectionAssert.AreEqual(expected, actual); }