Ejemplo n.º 1
0
        public GamesControllerTests()
        {
            _dummyGameState = GetDummyGameState();
            _dummyPlayer = GetDummyPlayer();

            _gameStateProvider = Substitute.For<IGameStateProvider>();
            _gameStateProvider.CreateGame(Arg.Any<string>()).ReturnsForAnyArgs(ValidationResult<GameState>.Success.WithData(_dummyGameState));
            _gameStateProvider.JoinGame(Arg.Any<Guid>(), Arg.Any<Guid>()).ReturnsForAnyArgs(ValidationResult<GameState>.Success.WithData(_dummyGameState));

            _controller = new GamesController(_gameStateProvider);
        }
Ejemplo n.º 2
0
 public GamesControllerTests()
 {
     _db = Substitute.For<IGameStateRepository>();
     _prov = new GameStateProvider(_db);
     _controller = new GamesController(_prov);
 }