public Game CreateGame() { var game = new Game { GameStateId = GameState.Open, }; return(_gameDataService.AddGame(game)); }
public void CreateGame_CreatesANewGameWithOpenGamestate() { // Arrange _gameDataService.AddGame(Arg.Any <Game>()).Returns(parameters => { return(parameters[0]); }); // Act var result = sut.CreateGame(); // Assert _gameDataService.Received().AddGame(Arg.Any <Game>()); result.GameStateId.Should().Be(GameState.Open); }