public void GivenAllGutterBalls_ShouldReturn0() { //arrange var game = new GameBuilder().WithAllGutterBalls().Build(); //act var actual = game.Score(); //assert; actual.Should().Be(0); }
public void Given20SinglePinRolls_ShouldReturn20() { //arrange var game = new GameBuilder() .WithXRolls(20, 1) .Build(); //act var actual = game.Score(); //assert; actual.Should().Be(20); }
public void GivenPerfectGame_ShouldReturn300() { //arrange var game = new GameBuilder() .WithXRolls(12, 10) .Build(); //act var actual = game.Score(); //assert; actual.Should().Be(300); }
public void Given1PinAndRestGutters_ShouldReturn1() { //arrange var game = new GameBuilder() .WithRoll(1) .WithRestOfGameAllGutterBalls() .Build(); //act var actual = game.Score(); //assert; actual.Should().Be(1); }
public void GivenRoll1IsStrike_Only18FurtherGuttersAreNeedForACompleteGame() { //arrange var game = new GameBuilder() .WithRoll(10) .WithXGutterBalls(18) .Build(); //act var actual = game.Score(); //assert; actual.Should().Be(10); }
public void GivenFrame1IsSpare_RestAreGutters_ShouldReturn10() { //arrange var game = new GameBuilder() .WithRoll(4) .WithRoll(6) .WithRestOfGameAllGutterBalls() .Build(); //act var actual = game.Score(); //assert; actual.Should().Be(10); }
public void Given18GutterBalls_And3_And7_Adds1ExtraRoll_ShouldReturn11() { //arrange var game = new GameBuilder() .WithXGutterBalls(18) .WithRoll(3) .WithRoll(7) .WithRoll(1) .Build(); //act var actual = game.Score(); //assert; actual.Should().Be(11); }
public void Given18GutterBalls_AndStrike_Adds2ExtraRolls_ShouldReturn12() { //arrange var game = new GameBuilder() .WithXGutterBalls(18) .WithRoll(10) .WithRoll(1) .WithRoll(1) .Build(); //act var actual = game.Score(); //assert; actual.Should().Be(12); }
public void GivenRoll1IsStrike_Frame2_4And4_RestGutters_ShouldReturn() { //arrange var game = new GameBuilder() .WithRoll(10) .WithRoll(4) .WithRoll(4) .WithRestOfFramesAllGutterBalls() .Build(); //act var actual = game.Score(); //assert; actual.Should().Be(26); }