Пример #1
0
        public GameStateProviderTests()
        {
            _dummyPlayer = GetDummyPlayer();
            _dummyMap = GetDummyMap();

            _gameStateRepository = Substitute.For<IGameStateRepository>();
            _playersProvider = Substitute.For<IPlayersProvider>();
            _playersProvider.Get(Guid.Empty).ReturnsForAnyArgs(_dummyPlayer);
            _mapProvider = Substitute.For<IMapProvider>();
            _mapProvider.GetRandomMap().ReturnsForAnyArgs(_dummyMap);
            _gameStateProvider = new GameStateProvider(_gameStateRepository, _playersProvider, _mapProvider);
        }
Пример #2
0
 public GamesControllerTests()
 {
     _db = Substitute.For<IGameStateRepository>();
     _prov = new GameStateProvider(_db);
     _controller = new GamesController(_prov);
 }
Пример #3
0
 public GamesController(GameStateProvider prov)
 {
     _prov = prov;
 }