Example #1
0
            public void ResolveRegularFrameResult_EmptyRolls()
            {
                Action action = () => FrameResultResolver.ResolveRegularFrameResult(new Roll[0], maxPinCount);

                action.Should().Throw <Exception>().WithMessage("FrameResult를 구할 수 없는 상태입니다.");
            }
Example #2
0
            public void ResolveRegularFrameResult_TooMuchRolls()
            {
                Action action = () => FrameResultResolver.ResolveRegularFrameResult(CreateRolls(1, 2, 3), maxPinCount);

                action.Should().Throw <Exception>().WithMessage("FrameResult를 구할 수 없는 상태입니다.");
            }
Example #3
0
            public void ResolveRegularFrameResult_InProgress()
            {
                var resultType = FrameResultResolver.ResolveRegularFrameResult(CreateRolls(1), maxPinCount);

                resultType.Should().Be(FrameResultType.InProgress);
            }
Example #4
0
            public void ResolveRegularFrameResult_Open()
            {
                var resultType = FrameResultResolver.ResolveRegularFrameResult(CreateRolls(1, 2), maxPinCount);

                resultType.Should().Be(FrameResultType.Open);
            }
Example #5
0
            public void ResolveRegularFrameResult_Spare()
            {
                var resultType = FrameResultResolver.ResolveRegularFrameResult(CreateRolls(maxPinCount - 1, 1), maxPinCount);

                resultType.Should().Be(FrameResultType.Spare);
            }