Beispiel #1
0
        public void PlayFrame_OpenFrameRolled_TwoBallsRolled()
        {
            // setup
            FinalFrame  frame = new FinalFrame();
            Queue <int> rolls = new Queue <int>(new[] { 0, 1, 10 });

            // act
            frame.PlayFrame(rolls);

            //assert
            Assert.That(frame.Turns, Has.Count.EqualTo(2));
        }
Beispiel #2
0
        public void PlayFrame_SpareRolled_ThreeBallsRolled()
        {
            // setup
            FinalFrame  frame = new FinalFrame();
            Queue <int> rolls = new Queue <int>(new [] { 2, 8, 1 });

            // act
            frame.PlayFrame(rolls);

            //assert
            Assert.That(frame.Turns, Has.Count.EqualTo(3));
        }
Beispiel #3
0
        public void PlayFrame_SecondRollStrike_ThreeBallsRolled()
        {
            // setup
            FinalFrame  frame = new FinalFrame();
            Queue <int> rolls = new Queue <int>(new[] { 0, 10, 0 });

            // act
            frame.PlayFrame(rolls);

            //assert
            Assert.That(frame.Turns, Has.Count.EqualTo(3));
        }
Beispiel #4
0
        public void PlayFrame_AnyRolls_OutcomeWillBeOpenFrame(params int[] rollValues)
        {
            // setup
            FinalFrame  frame = new FinalFrame();
            Queue <int> rolls = new Queue <int>(rollValues);

            // act
            frame.PlayFrame(rolls);

            //assert
            Assert.That(frame.FrameOutcome, Is.TypeOf(typeof(OpenFrame)));
        }