public HttpResponseMessage UpdatePlayedGame([FromBody] UpdatedPlayedGameMessage playedPlayedGameMessage) { var newlyCompletedGame = _transformer.Transform <UpdatedGame>(playedPlayedGameMessage); _playedGameSaver.UpdatePlayedGame(newlyCompletedGame, TransactionSource.RestApi, CurrentUser); return(Request.CreateResponse(HttpStatusCode.NoContent)); }
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)); }