public void SetUp() { _dataContextMock = MockRepository.GenerateMock <IDataContext>(); _nemesisRecalculatorMock = MockRepository.GenerateMock <INemesisRecalculator>(); _championRecalculatorMock = MockRepository.GenerateMock <IChampionRecalculator>(); _playedGameDeleter = new PlayedGameDeleter(_dataContextMock, _nemesisRecalculatorMock, _championRecalculatorMock); _currentUser = new ApplicationUser(); _playedGame = new PlayedGame() { GameDefinitionId = _gameDefinitionId }; _playerGameResults = new List <PlayerGameResult>() { new PlayerGameResult() { PlayerId = _playerInGame1Id, PlayedGameId = _playedGameId, PlayedGame = _playedGame }, new PlayerGameResult() { PlayerId = _playerInGame2Id, PlayedGameId = _playedGameId, PlayedGame = _playedGame }, new PlayerGameResult() { PlayerId = 3, PlayedGameId = _playedGameId + 9999, PlayedGame = _playedGame } }; _dataContextMock.Expect(mock => mock.GetQueryable <PlayerGameResult>()) .Return(_playerGameResults.AsQueryable()); }
public void SetUp() { dataContextMock = MockRepository.GenerateMock <IDataContext>(); nemesisRecalculatorMock = MockRepository.GenerateMock <INemesisRecalculator>(); playedGameDeleter = new PlayedGameDeleter(dataContextMock, nemesisRecalculatorMock); currentUser = new ApplicationUser(); playerGameResults = new List <PlayerGameResult>() { new PlayerGameResult() { PlayerId = playerInGame1Id, PlayedGameId = playedGameId }, new PlayerGameResult() { PlayerId = playerInGame2Id, PlayedGameId = playedGameId }, new PlayerGameResult() { PlayerId = 3, PlayedGameId = playedGameId + 9999 } }; dataContextMock.Expect(mock => mock.GetQueryable <PlayerGameResult>()) .Return(playerGameResults.AsQueryable()); }
public PlayerSaver(IDataContext dataContext, INemeStatsEventTracker eventTracker, INemesisRecalculator nemesisRecalculator, IPlayerInviter playerInviter, IChampionRecalculator championRecalculator) { _dataContext = dataContext; _eventTracker = eventTracker; _nemesisRecalculator = nemesisRecalculator; _playerInviter = playerInviter; _championRecalculator = championRecalculator; }
public PlayedGameCreator( IDataContext applicationDataContext, INemeStatsEventTracker playedGameTracker, INemesisRecalculator nemesisRecalculator, IChampionRecalculator championRecalculator, ISecuredEntityValidator <Player> securedEntityValidatorForPlayer, ISecuredEntityValidator <GameDefinition> securedEntityValidatorForGameDefinition) { this.dataContext = applicationDataContext; this.playedGameTracker = playedGameTracker; this.nemesisRecalculator = nemesisRecalculator; this.championRecalculator = championRecalculator; this.securedEntityValidatorForPlayer = securedEntityValidatorForPlayer; this.securedEntityValidatorForGameDefinition = securedEntityValidatorForGameDefinition; }
public PlayedGameEventHandler( IDataContext dataContext, INemeStatsEventTracker playedGameEventTracker, IAchievementProcessor achievementProcessor, IChampionRecalculator championRecalculator, INemesisRecalculator nemesisRecalculator, IGamingGroupChampionRecalculator gamingGroupChampionRecalculator, IRollbarClient rollbar) : base(dataContext) { _playedGameEventTracker = playedGameEventTracker; _achievementProcessor = achievementProcessor; _championRecalculator = championRecalculator; _nemesisRecalculator = nemesisRecalculator; _gamingGroupChampionRecalculator = gamingGroupChampionRecalculator; _rollbar = rollbar; }
public PlayedGameSaver( IDataContext applicationDataContext, INemeStatsEventTracker playedGameTracker, INemesisRecalculator nemesisRecalculator, IChampionRecalculator championRecalculator, ISecuredEntityValidator securedEntityValidator, IPointsCalculator pointsCalculator, IApplicationLinker applicationLinker, IBusinessLogicEventSender businessLogicEventSender, IWinnerTypeCalculator winnerTypeCalculator) { _dataContext = applicationDataContext; _securedEntityValidator = securedEntityValidator; _pointsCalculator = pointsCalculator; _applicationLinker = applicationLinker; _businessLogicEventSender = businessLogicEventSender; _winnerTypeCalculator = winnerTypeCalculator; }
public PlayedGameSaver( IDataContext applicationDataContext, INemeStatsEventTracker playedGameTracker, INemesisRecalculator nemesisRecalculator, IChampionRecalculator championRecalculator, ISecuredEntityValidator securedEntityValidator, IPointsCalculator pointsCalculator, IBusinessLogicEventBus eventBus, ILinkedPlayedGameValidator linkedPlayedGameValidator, IApplicationLinker applicationLinker) : base(eventBus) { _dataContext = applicationDataContext; _playedGameTracker = playedGameTracker; _nemesisRecalculator = nemesisRecalculator; _championRecalculator = championRecalculator; _securedEntityValidator = securedEntityValidator; _pointsCalculator = pointsCalculator; _linkedPlayedGameValidator = linkedPlayedGameValidator; _applicationLinker = applicationLinker; }
public void SetUp() { dataContextMock = MockRepository.GenerateMock<IDataContext>(); nemesisRecalculatorMock = MockRepository.GenerateMock<INemesisRecalculator>(); championRecalculatorMock = MockRepository.GenerateMock<IChampionRecalculator>(); playedGameDeleter = new PlayedGameDeleter(dataContextMock, nemesisRecalculatorMock, championRecalculatorMock); currentUser = new ApplicationUser(); playedGame = new PlayedGame() { GameDefinitionId = gameDefinitionId }; playerGameResults = new List<PlayerGameResult>() { new PlayerGameResult(){ PlayerId = playerInGame1Id, PlayedGameId = playedGameId, PlayedGame = playedGame }, new PlayerGameResult(){ PlayerId = playerInGame2Id, PlayedGameId = playedGameId, PlayedGame = playedGame }, new PlayerGameResult(){ PlayerId = 3, PlayedGameId = playedGameId + 9999, PlayedGame = playedGame } }; dataContextMock.Expect(mock => mock.GetQueryable<PlayerGameResult>()) .Return(playerGameResults.AsQueryable()); }
public PlayedGameDeleter(IDataContext dataContext, INemesisRecalculator nemesisRecalculatorMock, IChampionRecalculator championRecalculator) { this.dataContext = dataContext; this.nemesisRecalculator = nemesisRecalculatorMock; this.championRecalculator = championRecalculator; }
public PlayerSaver(IDataContext dataContext, INemeStatsEventTracker eventTracker, INemesisRecalculator nemesisRecalculator) { _dataContext = dataContext; _eventTracker = eventTracker; _nemesisRecalculator = nemesisRecalculator; }
public PlayerDeleter(IDataContext dataContext, IChampionRecalculator championRecalculator, INemesisRecalculator nemesisRecalculator) { _dataContext = dataContext; _championRecalculator = championRecalculator; _nemesisRecalculator = nemesisRecalculator; }
public PlayedGameDeleter(IDataContext dataContext, INemesisRecalculator nemesisRecalculatorMock) { this.dataContext = dataContext; this.nemesisRecalculator = nemesisRecalculatorMock; }