public void AddMatchGivingIdsTest() { sportsRepo.Add(sport); teamsRepo.Add(teamA); teamsRepo.Add(teamB); ICollection <int> teamsIds = matchAvsB.GetParticipants().Select(t => t.Id).ToList(); serviceToTest.AddEncounter(teamsIds, matchAvsB.Sport.Name, matchAvsB.Date); Assert.AreEqual(serviceToTest.GetAllEncounter().Count, 1); }
public void GetMatchTeamsTest() { AddSportAndTeams(); matchesStorage.Add(match); Encounter retrieved = matchesStorage.Get(match.Id); Assert.AreEqual(retrieved.GetParticipants().Count, match.GetParticipants().Count); }
public void ModifyTest() { AddSportAndTeams(); matchesStorage.Add(match); Match modified = BuildModifiedFakeMatch(); SetUpRepository(); matchesStorage.Modify(modified); Encounter retrieved = matchesStorage.Get(3); Assert.AreEqual(retrieved.GetParticipants().Count, modified.GetParticipants().Count); Assert.AreEqual(retrieved.Date, modified.Date); }