public void ShouldCallGameEvaluationResultWhenEvaluationSucceeds()
        {
            //ARRANGE
            var gameMock = new GameMock();

            var result = new SuccessGameEvaluationResult(GameCategory.ROYAL_FLUSH, null);

            var evaluation = new EvaluationMock();
            evaluation.EvaluateReturns(result);

            var subject = new GameEvaluationCommand(evaluation);

            //ACT
            var actual = subject.Evaluate(gameMock);

            //ASSERT
            Assert.AreSame(result, gameMock.ReceivedEvaluationResult);
        }
예제 #2
0
        public void ShouldCallGameEvaluationResultWhenEvaluationSucceeds()
        {
            //ARRANGE
            var gameMock = new GameMock();

            var result = new SuccessGameEvaluationResult(GameCategory.ROYAL_FLUSH, null);

            var evaluation = new EvaluationMock();

            evaluation.EvaluateReturns(result);

            var subject = new GameEvaluationCommand(evaluation);

            //ACT
            var actual = subject.Evaluate(gameMock);

            //ASSERT
            Assert.AreSame(result, gameMock.ReceivedEvaluationResult);
        }