public PlayerController( IGameResultViewModelBuilder builder, IPlayerDetailsViewModelBuilder playerDetailsViewModelBuilder, IShowingXResultsMessageBuilder showingXResultsMessageBuilder, IPlayerSaver playerSaver, IPlayerRetriever playerRetriever, IPlayerInviter playerInviter, IPlayerEditViewModelBuilder playerEditViewModelBuilder, IPlayerSummaryBuilder playerSummaryBuilder, ITopPlayerViewModelBuilder topPlayerViewModelBuilder, INemesisHistoryRetriever nemesisHistoryRetriever, INemesisChangeViewModelBuilder nemesisChangeViewModelBuilder, IPlayerDeleter playerDeleter) { this.builder = builder; this.playerDetailsViewModelBuilder = playerDetailsViewModelBuilder; this.showingXResultsMessageBuilder = showingXResultsMessageBuilder; this.playerSaver = playerSaver; this.playerRetriever = playerRetriever; this.playerInviter = playerInviter; this.playerEditViewModelBuilder = playerEditViewModelBuilder; this.playerSummaryBuilder = playerSummaryBuilder; this.topPlayerViewModelBuilder = topPlayerViewModelBuilder; this.nemesisHistoryRetriever = nemesisHistoryRetriever; this.nemesisChangeViewModelBuilder = nemesisChangeViewModelBuilder; _playerDeleter = playerDeleter; }
public GameDefinitionController(IDataContext dataContext, IGameDefinitionRetriever gameDefinitionRetriever, IGameDefinitionDetailsViewModelBuilder gameDefinitionTransformation, IShowingXResultsMessageBuilder showingXResultsMessageBuilder, IGameDefinitionSaver gameDefinitionCreator, IBoardGameGeekApiClient boardGameGeekApiClient) { this.dataContext = dataContext; this.gameDefinitionRetriever = gameDefinitionRetriever; this.gameDefinitionTransformation = gameDefinitionTransformation; this.showingXResultsMessageBuilder = showingXResultsMessageBuilder; this.gameDefinitionSaver = gameDefinitionCreator; _boardGameGeekApiClient = boardGameGeekApiClient; }
public PlayedGameController( NemeStatsDataContext dataContext, IPlayedGameRetriever playedGameRetriever, IPlayerRetriever playerRetriever, IPlayedGameDetailsViewModelBuilder builder, IGameDefinitionRetriever gameDefinitionRetriever, IShowingXResultsMessageBuilder showingXResultsMessageBuilder, IPlayedGameCreator playedGameCreator, IPlayedGameDeleter playedGameDeleter) { this.dataContext = dataContext; this.playedGameRetriever = playedGameRetriever; this.playerRetriever = playerRetriever; this.playedGameDetailsBuilder = builder; this.gameDefinitionRetriever = gameDefinitionRetriever; this.showingXResultsMessageBuilder = showingXResultsMessageBuilder; this.playedGameCreator = playedGameCreator; this.playedGameDeleter = playedGameDeleter; }
public virtual void SetUp() { AutomapperConfiguration.Configure(); dataContextMock = MockRepository.GenerateMock <NemeStatsDataContext>(); gameDefinitionRetrieverMock = MockRepository.GenerateMock <IGameDefinitionRetriever>(); gameDefinitionTransformationMock = MockRepository.GenerateMock <IGameDefinitionDetailsViewModelBuilder>(); showingXResultsMessageBuilderMock = MockRepository.GenerateMock <IShowingXResultsMessageBuilder>(); gameDefinitionCreatorMock = MockRepository.GenerateMock <IGameDefinitionSaver>(); urlHelperMock = MockRepository.GenerateMock <UrlHelper>(); boardGameGeekApiClient = MockRepository.GenerateMock <IBoardGameGeekApiClient>(); gameDefinitionControllerPartialMock = MockRepository.GeneratePartialMock <GameDefinitionController>( dataContextMock, gameDefinitionRetrieverMock, gameDefinitionTransformationMock, showingXResultsMessageBuilderMock, gameDefinitionCreatorMock, boardGameGeekApiClient); gameDefinitionControllerPartialMock.Url = urlHelperMock; asyncRequestMock = MockRepository.GenerateMock <HttpRequestBase>(); asyncRequestMock.Expect(x => x.Headers) .Repeat.Any() .Return(new System.Net.WebHeaderCollection { { "X-Requested-With", "XMLHttpRequest" } }); var context = MockRepository.GenerateMock <HttpContextBase>(); context.Expect(x => x.Request) .Repeat.Any() .Return(asyncRequestMock); gameDefinitionControllerPartialMock.ControllerContext = new ControllerContext(context, new RouteData(), gameDefinitionControllerPartialMock); currentUser = new ApplicationUser() { Id = "user id", CurrentGamingGroupId = 15151 }; }
public GamingGroupController( IGamingGroupViewModelBuilder gamingGroupViewModelBuilder, IGamingGroupAccessGranter gamingGroupAccessGranter, IGamingGroupSaver gamingGroupSaver, IGamingGroupRetriever gamingGroupRetriever, IShowingXResultsMessageBuilder showingXResultsMessageBuilder, IPlayerWithNemesisViewModelBuilder playerWithNemesisViewModelBuilder, IPlayedGameDetailsViewModelBuilder playedGameDetailsViewModelBuilder, IGameDefinitionSummaryViewModelBuilder gameDefinitionSummaryViewModelBuilder, IGamingGroupContextSwitcher gamingGroupContextSwitcher) { this.gamingGroupViewModelBuilder = gamingGroupViewModelBuilder; this.gamingGroupAccessGranter = gamingGroupAccessGranter; this.gamingGroupSaver = gamingGroupSaver; this.gamingGroupRetriever = gamingGroupRetriever; this.showingXResultsMessageBuilder = showingXResultsMessageBuilder; this.playerWithNemesisViewModelBuilder = playerWithNemesisViewModelBuilder; this.playedGameDetailsViewModelBuilder = playedGameDetailsViewModelBuilder; this.gameDefinitionSummaryViewModelBuilder = gameDefinitionSummaryViewModelBuilder; this.gamingGroupContextSwitcher = gamingGroupContextSwitcher; }
public void SetUp() { messageBuilder = new ShowingXResultsMessageBuilder(); }