public void TestInit() { repo = new EncounterRepository(GetContextFactory()); futbol = CreateFutbolTeam(); rugby = CreateRugbyTeam(); macri = CreateMacriUser(); boca = CreateBocaTeam(); river = CreateTeamThatBelongsInTheB(); tomba = CreateGodoyCruzTeam(); bocaRiver = CreateBocaRiverEncounter(); tombaRiver = CreateTombaRiverEncounter(); repo.Add(bocaRiver); repo.Add(tombaRiver); }
public void DeleteSportCascadeTest() { sportStorage.Add(sportA); ITeamRepository teams = new TeamRepository(context); Team teamA = new Team("TeamA", "photoA", sportA); Team teamB = new Team("TeamB", "photoB", sportA); teams.Add(teamA); teams.Add(teamB); IEncounterRepository encounters = new EncounterRepository(context); Encounter aVsB = new Match(new List <Team>() { teamA, teamB }, DateTime.Today, sportA); encounters.Add(aVsB); sportStorage.Delete(sportA.Name); Assert.IsTrue(teams.IsEmpty()); }