示例#1
0
        public void TestGutterGame()
        {
            int rolls = 20;
            int pins  = 0;

            RollMany(rolls, pins);
            Assert.Equal(0, _g.Score());
        }
示例#2
0
        public void test_rollTwice()
        {
            game.Roll(2);
            game.Roll(3);

            Assert.AreEqual(5, game.Score());
        }
        public void PerfectGameShouldGetPerfectScore()
        {
            Game game = new Game();

            RollMany(game, 12, 10);
            Assert.AreEqual(300, game.Score());
        }
        public void AllOnesGameShouldScoreTwenty()
        {
            Game game = new Game();

            RollMany(game, 20, 1);

            Assert.AreEqual(20, game.Score());
        }
        public void AllGutterGameScoreShouldBeZero()
        {
            Game game = new Game();

            RollsMany(game, 20, 0);

            Assert.AreEqual(0, game.Score());
        }
        public void SpareShouldGetNextRollBonus()
        {
            Game game = new Game();

            game.Roll(2);
            game.Roll(8);
            game.Roll(6);
            RollsMany(game, 18, 0);
            Assert.AreEqual(22, game.Score());
        }
示例#7
0
        public void Return_0_when_no_pins_striked_down()
        {
            var game = new Game();

            for (int i = 1; i <= 20; i++)
            {
                game.Roll(0);
            }
            Assert.AreEqual(0, game.Score());
        }
        public void StrikeShouldGetTwoRollBonus()
        {
            Game game = new Game();

            game.Roll(10);
            game.Roll(2);
            game.Roll(7);


            RollsMany(game, 14, 0);
            Assert.AreEqual(28, game.Score());
        }
示例#9
0
 public void TestForAll0()
 {
     for (int i = 0; i < 20; i++)
     {
         game.Roll(0);
     }
     Assert.Equal(0, game.Score());
 }
        public void It_should_score_the_number_of_knock_down_pins()
        {
            var expectedScore = 14;

            CreateFrame(6, 8);
            var score = game.Score();

            Assert.True(score == expectedScore);
        }
示例#11
0
        public void testGutterGame()
        {
            RollMany(20, 0);

            Assert.AreEqual(0, g.Score());
        }
示例#12
0
 public void TestAll0()
 {
     MultipleRolls(20, 0);
     Assert.AreEqual(0, g.Score());
 }
示例#13
0
        public void TestAllGuterGame()
        {
            RollMany(rollCount: 20, pins: 0);

            Assert.AreEqual(0, g.Score());
        }
示例#14
0
 public void TestGutterGame()
 {
     RollMany(20, 0);
     game.Score().ShouldBe(0);
 }
示例#15
0
 public void TestGutterGame()
 {
     Setup();
     RollMany(20, 0);
     Assert.AreEqual(0, g.Score());
 }
示例#16
0
        public void TestGutterGame()
        {
            RollFrame(0, 0, 10);

            Assert.AreEqual(g.Score(), 0);
        }