public void The_Score_Of_Game_With_No_Spares_And_Strikes_Is_The_Sum_OF_Rols() { var game = new Game(); game.AddFrame(new Frame() { FirstRoll = 1, SecondRoll = 2 }); game.AddFrame(new Frame() { FirstRoll = 2, SecondRoll = 3 }); var bowling = new BowlingScoreCalculator(); var score = bowling.GetScore(game); Assert.AreEqual(8, score); }
public void When_First_Frame_Was_Strike_And_Second_Wasnt_Then_Third_Frame_Is_Counted_Only_Once() { var game = new Game(); game.AddFrame(new Frame() { FirstRoll = 10, SecondRoll = 0 }); game.AddFrame(new Frame() { FirstRoll = 3, SecondRoll = 5 }); game.AddFrame(new Frame() { FirstRoll = 1, SecondRoll = 0 }); var bowling = new BowlingScoreCalculator(); var score = bowling.GetScore(game); Assert.AreEqual(27, score); }
public void When_First_Roll_Of_First_Frame_Equals_10_Then_The_Score_Of_The_Second_Frame_is_added_Twice() { var game = new Game(); game.AddFrame(new Frame() { FirstRoll = 10, SecondRoll = 0 }); game.AddFrame(new Frame() { FirstRoll = 2, SecondRoll = 3 }); var bowling = new BowlingScoreCalculator(); var score = bowling.GetScore(game); Assert.AreEqual(20, score); }
public void When_Two_Frames_In_Row_Are_Strike_Then_Third_Frame_Is_Counted_For_Second_Frame() { var game = new Game(); game.AddFrame(new Frame() // == 10+10+1 (?) { FirstRoll = 10, SecondRoll = 0 }); game.AddFrame(new Frame() // == 10 + 1+1 { FirstRoll = 10, SecondRoll = 0 }); game.AddFrame(new Frame() // == 1+1 { FirstRoll = 1, SecondRoll = 1 }); var bowling = new BowlingScoreCalculator(); var score = bowling.GetScore(game); Assert.AreEqual(35, score); }