public void TestGroupMatches_GetResult_ShouldReturnTeam2_WhenResultIsLoss() { var gm = new BetterPageViewModel.GroupMatches(); var match = new Tuple <string, string, string, string>("team1", "team2", "b", "b"); gm.GetResults(match).ShouldBe("team2"); var match2 = new Tuple <string, string, string, string>("toto", "fofo", "b", "b"); gm.GetResults(match2).ShouldBe("fofo"); }
public void TestGroupMatches_GetResults_ShouldReturnEmpty_WhenNoResults() { var gm = new BetterPageViewModel.GroupMatches(); var match = new Tuple <string, string, string, string>("team1", "team2", "h", "-"); gm.GetResults(match, "-").ShouldBe(""); }
public void TestGroupMatches_GetResult_ShouldBeCaseInsensitve() { var gm = new BetterPageViewModel.GroupMatches(); var match = new Tuple <string, string, string, string>("team1", "team2", "h", "h"); var match2 = new Tuple <string, string, string, string>("team1", "team2", "H", "H"); gm.GetResults(match).ShouldBe(gm.GetResults(match2)); match = new Tuple <string, string, string, string>("team1", "team2", "b", "b"); match2 = new Tuple <string, string, string, string>("team1", "team2", "B", "B"); gm.GetResults(match).ShouldBe(gm.GetResults(match2)); match = new Tuple <string, string, string, string>("team1", "team2", "u", "u"); match2 = new Tuple <string, string, string, string>("team1", "team2", "U", "U"); gm.GetResults(match).ShouldBe(gm.GetResults(match2)); }