示例#1
0
        public void MidGame()
        {
            // Arrange
            ISimpleBowlingGame game = _Factory.Create();

            // Act
            game.RecordFrame(5, 5);             // 1st frame
            game.RecordFrame(5, 5);             // 2nd frame
            game.RecordFrame(5, 5);             // 3rd frame
            game.RecordFrame(5, 5);             // 4th frame
            game.RecordFrame(5, 5);             // 5th frame
            game.RecordFrame(5, 5);             // 6th frame
            game.RecordFrame(5, 5);             // 7th frame
            game.RecordFrame(5, 5);             // 8th frame
            game.RecordFrame(5, 5);             // 9th frame
            game.RecordFrame(5, 5, 5);          // 10th frame

            // Assert
            Assert.AreEqual(150, game.Score);
        }
示例#2
0
        public void MixGame()
        {
            // Arrange
            ISimpleBowlingGame game = _Factory.Create();

            // Act
            game.RecordFrame(4, 5);           // 1st frame
            game.RecordFrame(7, 3);           // 2nd frame
            game.RecordFrame(6, 2);           // 3rd frame
            game.RecordFrame(9, 1);           // 4th frame
            game.RecordFrame(10);             // 5th frame
            game.RecordFrame(4, 6);           // 6th frame
            game.RecordFrame(7, 2);           // 7th frame
            game.RecordFrame(9, 0);           // 8th frame
            game.RecordFrame(10);             // 9th frame
            game.RecordFrame(3, 4);           // 10th frame

            // Assert
            Assert.AreEqual(132, game.Score);
        }