Exemplo n.º 1
0
        public Game CreateGame()
        {
            var game = new Game
            {
                GameStateId = GameState.Open,
            };

            return(_gameDataService.AddGame(game));
        }
Exemplo n.º 2
0
        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);
        }