public void AddTeamWhenNullShouldDoNothing() { string[,] teamList = { { "Team 1", "12" }, { "Team 2", "10" } }; Competition initialCompetition = new Competition(teamList); initialCompetition.AddTeam(null); Assert.Equal(teamList, initialCompetition.GetClasification()); }
public void AddMatchWhenEmptyShouldDoNothing() { string[,] teamList = { { "Team 1", "12" }, { "Team 2", "10" } }; Competition initialCompetition = new Competition(teamList); string[,] matchList = { { } }; initialCompetition.AddTeam(matchList); Assert.Equal(teamList, initialCompetition.GetClasification()); }
public void AddTeamWhenTeamAlreadyExistsShouldIgnoreItAddTheOtherTeamsAndSortClasification() { string[,] finalTeamList = { { "Team 1", "12" }, { "Team 3", "11" }, { "Team 2", "10" } }; string[,] initialTeamList = { { "Team 1", "12" }, { "Team 2", "10" } }; Competition initialCompetition = new Competition(initialTeamList); string[,] teamListToAdd = { { "Team 3", "11" }, { "Team 2", "8" } }; initialCompetition.AddTeam(teamListToAdd); Assert.Equal(finalTeamList, initialCompetition.GetClasification()); }
public void AddTeamWhenMoreThanOneTeamShouldAddTeamsAndSortClasification() { string[,] finalTeamList = { { "Team 1", "12" }, { "Team 3", "11" }, { "Team 2", "10" }, { "Team 4", "8" } }; string[,] initialTeamList = { { "Team 1", "12" }, { "Team 2", "10" } }; Competition initialCompetition = new Competition(initialTeamList); string[,] teamListToAdd = { { "Team 3", "11" }, { "Team 4", "8" } }; initialCompetition.AddTeam(teamListToAdd); Assert.Equal(finalTeamList, initialCompetition.GetClasification()); }