コード例 #1
0
        public void Should_be_return_exception_for_wrong_number_of_players()
        {
            var turn      = TurnDtoFake.GetFilledWithWrongNumberOfPlayers();
            var exception = Assert.Throws <Exception>(() => GameBusiness.RunTurn(turn));

            exception.Message.Should().Be(ERROR_MESSAGE_NUMBER_PLAYERS_INCORRECT);
        }
コード例 #2
0
        public void Should_be_return_exception_for_wrong_choice_of_move()
        {
            var turn      = TurnDtoFake.GetFilledWithWrongChoiceMove();
            var exception = Assert.Throws <Exception>(() => GameBusiness.RunTurn(turn));

            exception.Message.Should().Be(ERROR_MESSAGE_STRATEGY_ERROR);
        }
コード例 #3
0
        public void Should_be_return_the_winner_of_game()
        {
            var turn     = TurnDtoFake.GetFilled();
            var obtained = GameBusiness.RunTurn(turn);

            obtained.Should().BeEquivalentTo(Player);
        }