public void GetFrameScoreScenario3Game10IsStrikeAllowstwoMoreBalls() { BowlingKataGame game = new BowlingKataGame(); game.RollBall(10); game.RollBall(10); game.RollBall(10); game.RollBall(10); game.RollBall(10); game.RollBall(10); game.RollBall(10); game.RollBall(10); game.RollBall(10); game.RollBall(10); game.RollBall(10); game.RollBall(10); Assert.AreEqual(300, game.GetScores()); Assert.AreEqual(0, game.GetRemainingBonusBalls()); Assert.AreEqual(10, game.GetActiveFrameNumber()); game.RollBall(10);// this ball should be ignored... Assert.AreEqual(300, game.GetScores()); Assert.AreEqual(0, game.GetRemainingBonusBalls()); Assert.AreEqual(10, game.GetActiveFrameNumber()); }
public void GetFrameScoreScenario2BonusPointsAddedtoCorrectFrame() { BowlingKataGame game = new BowlingKataGame(); game.RollBall(10); game.RollBall(4); game.RollBall(6); Assert.AreEqual(30, game.GetScores()); }
public void GetScorseWhenAStrike() { BowlingKataGame game = new BowlingKataGame(); game.RollBall(10); int actualFrameNumber = game.GetActiveFrameNumber(); int expectedFrameNumber = 2; int actualBonusBalls = game.GetRemainingBonusBalls(); int expectedBonusBalls = 2; Console.WriteLine("Actual Frame" + actualFrameNumber); Console.WriteLine("Actual BonusBalls" + actualBonusBalls); Assert.AreEqual(expectedFrameNumber, actualFrameNumber); Assert.AreEqual(expectedBonusBalls, actualBonusBalls); int actualScore = game.GetScores(); int expectedScore = 10; Assert.AreEqual(expectedScore, actualScore); }