Пример #1
0
        public void perfect_game()
        {
            var game = new BowlingGameBuilder()
                .RollMany(12, 10)
                .Build();

            game.Score.Should().Be(300);
        }
Пример #2
0
        public void gutter_game()
        {
            var game = new BowlingGameBuilder()
                .RollMany(20, 0)
                .Build();

            game.Score.Should().Be(0);
        }
Пример #3
0
        public void all_ones()
        {
            var game = new BowlingGameBuilder()
                .RollMany(20, 1)
                .Build();

            game.Score.Should().Be(20);
        }
Пример #4
0
        public void one_spare()
        {
            var game = new BowlingGameBuilder()
                .RollSpare()
                .Roll(3)
                .RollMany(17, 0)
                .Build();

            game.Score.Should().Be(16);
        }
Пример #5
0
        public void one_strike()
        {
            var game = new BowlingGameBuilder()
                .RollStrike()
                .Roll(3)
                .Roll(4)
                .RollMany(16, 0)
                .Build();

            game.Score.Should().Be(24);
        }