예제 #1
0
        public HttpResponseMessage UpdatePlayedGame([FromBody] UpdatedPlayedGameMessage playedPlayedGameMessage)
        {
            var newlyCompletedGame = _transformer.Transform <UpdatedGame>(playedPlayedGameMessage);

            _playedGameSaver.UpdatePlayedGame(newlyCompletedGame, TransactionSource.RestApi, CurrentUser);

            return(Request.CreateResponse(HttpStatusCode.NoContent));
        }
예제 #2
0
        public void LocalSetUp()
        {
            _playedPlayedGameMessage = new UpdatedPlayedGameMessage();

            _expectedUpdatedGame = new UpdatedGame();

            _autoMocker.Get <ITransformer>()
            .Expect(mock => mock.Transform <UpdatedGame>(_playedPlayedGameMessage))
            .IgnoreArguments()
            .Return(_expectedUpdatedGame);
            _autoMocker.Get <IPlayedGameSaver>().Expect(mock => mock.UpdatePlayedGame(
                                                            Arg <UpdatedGame> .Is.Anything,
                                                            Arg <TransactionSource> .Is.Anything,
                                                            Arg <ApplicationUser> .Is.Anything));
        }