예제 #1
0
        public void All_single_and_miss_20_rolls()
        {
            Bowling bowling = new Bowling();

            int score = bowling.CalculeScore("9-9-9-9-9-9-9-9-9-9-");

            Assert.AreEqual(90, score);
        }
예제 #2
0
        public void All_strikes_12_rolls()
        {
            Bowling bowling = new Bowling();

            int score = bowling.CalculeScore("XXXXXXXXXXXX");

            Assert.AreEqual(300, score);
        }
예제 #3
0
        public void All_semi_strikes_21_rolls()
        {
            Bowling bowling = new Bowling();

            int score = bowling.CalculeScore("5/5/5/5/5/5/5/5/5/5/5");

            Assert.AreEqual(150, score);
        }
예제 #4
0
        public void Strike_with_bowls_after()
        {
            Bowling bowling = new Bowling();

            int score = bowling.CalculeScore("X12----------------");

            Assert.AreEqual(16, score);
        }
예제 #5
0
        public void Single_strike()
        {
            Bowling bowling = new Bowling();

            int score = bowling.CalculeScore("-1X----------------");

            Assert.AreEqual(11, score);
        }
예제 #6
0
        public void Semi_strike_with_bowls_after()
        {
            Bowling bowling = new Bowling();

            int score = bowling.CalculeScore("--2/1---------------");

            Assert.AreEqual(12, score);
        }
예제 #7
0
        public void Single_scores_should_be_single_added()
        {
            Bowling bowling = new Bowling();

            int score = bowling.CalculeScore("-1-2----------------");

            Assert.AreEqual(3, score);
        }
예제 #8
0
        public void All_fails_should_be_0()
        {
            Bowling bowling = new Bowling();

            int score = bowling.CalculeScore("--------------------");

            Assert.AreEqual(0, score);
        }