public void GivenAValidGo_WhenGoIsSubmitted_ThenGameIsSavedToList() { var game = new Game(); goHandler.Go(game).Returns(new GoResult() { IsValid = true, Game = game }); manager.SubmitGo(game); gameList.Received().Set(game); }
public GoResult SubmitGo(Game game) { var result = goHandler.Go(game); if (result.IsValid) { game.LastActiveTime = DateTimeOffset.Now; gameRepo.Set(result.Game); } return(result); }