public void TestGetQuarterFinalScore_ShouldReturnPointsPerCorrectWinner() { int points = ScoringSystem.Points.QuarterFinalWinner; string bet = @"[stage-two] quarter-final = [ ""Brasil"", ""Spania"", ""Tyskland"", ""Argentina"",] "; string res = @"[stage-two] quarter-final = [ ""Brasil"",] "; var user = new Results(bet.ParseAsToml()); var actual = new Results(res.ParseAsToml()); var s = new ScoringSystem(user, actual); s.GetQuarterFinalScore().ShouldBe(points); res = @"[stage-two] quarter-final = [ ""Brasil"", ""Spania"", ] "; actual = new Results(res.ParseAsToml()); s = new ScoringSystem(user, actual); s.GetQuarterFinalScore().ShouldBe(points + points); res = @"[stage-two] quarter-final = [ ""NotATeam"", ""Spania"", ] "; actual = new Results(res.ParseAsToml()); s = new ScoringSystem(user, actual); s.GetQuarterFinalScore().ShouldBe(points); }
public void TestGetQuarterFinalScore_ShouldNotReturnPoints_WhenActualIsDash() { string res = @"[stage-two] quarter-final = [ ""Tyskland"", ""-"", ] "; var actual = new Results(res.ParseAsToml()); var s = new ScoringSystem(actual, actual); s.GetQuarterFinalScore().ShouldBe(ScoringSystem.Points.QuarterFinalWinner); }
public void TestGetQuarterFinalScore_ShouldReturnPointsForWinnersInAnyPosition() { string bet = @"[stage-two] quarter-final = [ ""Brasil"", ""Spania"", ""Tyskland"", ""Argentina"",] "; string res = @"[stage-two] quarter-final = [ ""Tyskland"", ""Brasil"", ] "; var user = new Results(bet.ParseAsToml()); var actual = new Results(res.ParseAsToml()); var s = new ScoringSystem(user, actual); s.GetQuarterFinalScore().ShouldBe(2 * ScoringSystem.Points.QuarterFinalWinner); }