public void should_CreateABowlingFrame_When_Invoked(string scoreString, int bowlOneScore, int bowlTwoScore, int bowlTotal, string scoreText) { var bowlingCreator = new BowlingFrameCreator(new BowlScorer()); var result = bowlingCreator.Create(scoreString); Assert.That(result.BowlOneScore, Is.EqualTo(bowlOneScore)); Assert.That(result.BowlTwoScore, Is.EqualTo(bowlTwoScore)); Assert.That(result.FrameBowlsTotal, Is.EqualTo(bowlTotal)); Assert.That(result.FrameScoreText, Is.EqualTo(scoreText)); }
public void should_CreateASecondBonusBowlingFrame_When_FirstOrSecondAreStrikesorSpare(string scoreString, int bowlOneScore, int bowlTwoScore, int bowlTotal, string scoreText, int bonusOne, int?bonusTwo) { var bowlingCreator = new BowlingFrameCreator(new BowlScorer()); var result = bowlingCreator.Create(scoreString); Assert.That(result.BowlOneScore, Is.EqualTo(bowlOneScore)); Assert.That(result.BowlTwoScore, Is.EqualTo(bowlTwoScore)); Assert.That(result.FrameBowlsTotal, Is.EqualTo(bowlTotal)); Assert.That(result.FrameScoreText, Is.EqualTo(scoreText)); Assert.That(result.BonusFrameOne.BowlOneScore, Is.EqualTo(bonusOne)); Assert.That(result.BonusFrameTwo.BowlOneScore, Is.EqualTo(bonusTwo)); }