public TestController(ITeamDataSource teamDataSource, IMatchListingDataSource matchDataSource, UmbracoHelper umbracoHelper) : base( Mock.Of <IGlobalSettings>(), Mock.Of <IUmbracoContextAccessor>(), null, AppCaches.NoCache, Mock.Of <IProfilingLogger>(), umbracoHelper, teamDataSource, matchDataSource, Mock.Of <IAuthorizationPolicy <Team> >(), Mock.Of <IDateTimeFormatter>(), Mock.Of <IEmailProtector>()) { var request = new Mock <HttpRequestBase>(); request.SetupGet(x => x.Url).Returns(new Uri("https://example.org")); var context = new Mock <HttpContextBase>(); context.SetupGet(x => x.Request).Returns(request.Object); var controllerContext = new Mock <ControllerContext>(); controllerContext.Setup(p => p.HttpContext).Returns(context.Object); controllerContext.Setup(p => p.HttpContext.User).Returns(new GenericPrincipal(new GenericIdentity("test"), null)); ControllerContext = controllerContext.Object; }
public TournamentController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ServiceContext serviceContext, AppCaches appCaches, IProfilingLogger profilingLogger, UmbracoHelper umbracoHelper, ITournamentDataSource tournamentDataSource, IMatchListingDataSource matchDataSource, IMatchFilterFactory matchFilterFactory, ICommentsDataSource <Tournament> commentsDataSource, IAuthorizationPolicy <Tournament> authorizationPolicy, IDateTimeFormatter dateFormatter, IEmailProtector emailProtector, IBadLanguageFilter badLanguageFilter) : base(globalSettings, umbracoContextAccessor, serviceContext, appCaches, profilingLogger, umbracoHelper) { _tournamentDataSource = tournamentDataSource ?? throw new ArgumentNullException(nameof(tournamentDataSource)); _matchDataSource = matchDataSource ?? throw new ArgumentNullException(nameof(matchDataSource)); _matchFilterFactory = matchFilterFactory ?? throw new ArgumentNullException(nameof(matchFilterFactory)); _commentsDataSource = commentsDataSource ?? throw new ArgumentNullException(nameof(commentsDataSource)); _authorizationPolicy = authorizationPolicy ?? throw new ArgumentNullException(nameof(authorizationPolicy)); _dateFormatter = dateFormatter ?? throw new ArgumentNullException(nameof(dateFormatter)); _emailProtector = emailProtector ?? throw new ArgumentNullException(nameof(emailProtector)); _badLanguageFilter = badLanguageFilter ?? throw new ArgumentNullException(nameof(badLanguageFilter)); }
public MatchesCalendarController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ServiceContext serviceContext, AppCaches appCaches, IProfilingLogger profilingLogger, UmbracoHelper umbracoHelper, IClubDataSource clubDataSource, ITeamDataSource teamDataSource, ICompetitionDataSource competitionDataSource, IMatchLocationDataSource matchLocationDataSource, IMatchListingDataSource matchListingDataSource, ITournamentDataSource tournamentDataSource, IMatchDataSource matchDataSource, IDateTimeFormatter dateFormatter, IMatchFilterQueryStringParser matchFilterQueryStringParser, IMatchFilterHumanizer matchFilterHumanizer) : base(globalSettings, umbracoContextAccessor, serviceContext, appCaches, profilingLogger, umbracoHelper) { _clubDataSource = clubDataSource ?? throw new ArgumentNullException(nameof(clubDataSource)); _teamDataSource = teamDataSource ?? throw new ArgumentNullException(nameof(teamDataSource)); _competitionDataSource = competitionDataSource ?? throw new ArgumentNullException(nameof(competitionDataSource)); _matchLocationDataSource = matchLocationDataSource ?? throw new ArgumentNullException(nameof(matchLocationDataSource)); _matchListingDataSource = matchListingDataSource ?? throw new ArgumentNullException(nameof(matchListingDataSource)); _tournamentDataSource = tournamentDataSource ?? throw new ArgumentNullException(nameof(tournamentDataSource)); _matchDataSource = matchDataSource ?? throw new ArgumentNullException(nameof(matchDataSource)); _dateFormatter = dateFormatter ?? throw new ArgumentNullException(nameof(dateFormatter)); _matchFilterQueryStringParser = matchFilterQueryStringParser ?? throw new ArgumentNullException(nameof(matchFilterQueryStringParser)); _matchFilterHumanizer = matchFilterHumanizer ?? throw new ArgumentNullException(nameof(matchFilterHumanizer)); }
public TestController(IMatchListingDataSource matchDataSource, IMatchesRssQueryStringParser queryStringParser, IMatchFilterHumanizer matchFilterHumanizer, UmbracoHelper umbracoHelper) : base( Mock.Of <IGlobalSettings>(), Mock.Of <IUmbracoContextAccessor>(), null, AppCaches.NoCache, Mock.Of <IProfilingLogger>(), umbracoHelper, Mock.Of <IClubDataSource>(), Mock.Of <ITeamDataSource>(), Mock.Of <ICompetitionDataSource>(), Mock.Of <IMatchLocationDataSource>(), matchDataSource, Mock.Of <IDateTimeFormatter>(), queryStringParser, matchFilterHumanizer) { var request = new Mock <HttpRequestBase>(); request.SetupGet(x => x.Url).Returns(new Uri("https://example.org")); request.SetupGet(x => x.RawUrl).Returns("/matches.rss"); request.SetupGet(x => x.QueryString).Returns(HttpUtility.ParseQueryString(string.Empty)); var context = new Mock <HttpContextBase>(); context.SetupGet(x => x.Request).Returns(request.Object); var controllerContext = new Mock <ControllerContext>(); controllerContext.Setup(p => p.HttpContext).Returns(context.Object); controllerContext.Setup(p => p.HttpContext.User).Returns(new GenericPrincipal(new GenericIdentity("test"), null)); ControllerContext = controllerContext.Object; }
public MatchesForTeamController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ServiceContext serviceContext, AppCaches appCaches, IProfilingLogger profilingLogger, UmbracoHelper umbracoHelper, ITeamDataSource teamDataSource, IMatchFilterFactory matchFilterFactory, IMatchListingDataSource matchDataSource, IDateTimeFormatter dateFormatter, ICreateMatchSeasonSelector createMatchSeasonSelector, IAuthorizationPolicy <Team> authorizationPolicy, IMatchFilterQueryStringParser matchFilterQueryStringParser, IMatchFilterHumanizer matchFilterHumanizer) : base(globalSettings, umbracoContextAccessor, serviceContext, appCaches, profilingLogger, umbracoHelper) { _teamDataSource = teamDataSource ?? throw new ArgumentNullException(nameof(teamDataSource)); _matchFilterFactory = matchFilterFactory ?? throw new ArgumentNullException(nameof(matchFilterFactory)); _matchDataSource = matchDataSource ?? throw new ArgumentNullException(nameof(matchDataSource)); _dateFormatter = dateFormatter ?? throw new ArgumentNullException(nameof(dateFormatter)); _createMatchSeasonSelector = createMatchSeasonSelector ?? throw new ArgumentNullException(nameof(createMatchSeasonSelector)); _authorizationPolicy = authorizationPolicy ?? throw new ArgumentNullException(nameof(authorizationPolicy)); _matchFilterQueryStringParser = matchFilterQueryStringParser ?? throw new ArgumentNullException(nameof(matchFilterQueryStringParser)); _matchFilterHumanizer = matchFilterHumanizer ?? throw new ArgumentNullException(nameof(matchFilterHumanizer)); }
public TestController(ITeamDataSource teamDataSource, IMatchListingDataSource matchDataSource, ICreateMatchSeasonSelector createMatchSeasonSelector, IMatchFilterQueryStringParser matchFilterQueryStringParser, UmbracoHelper umbracoHelper) : base( Mock.Of <IGlobalSettings>(), Mock.Of <IUmbracoContextAccessor>(), null, AppCaches.NoCache, Mock.Of <IProfilingLogger>(), umbracoHelper, teamDataSource, Mock.Of <IMatchFilterFactory>(), matchDataSource, Mock.Of <IDateTimeFormatter>(), createMatchSeasonSelector, Mock.Of <IAuthorizationPolicy <Team> >(), matchFilterQueryStringParser, Mock.Of <IMatchFilterHumanizer>()) { var request = new Mock <HttpRequestBase>(); request.SetupGet(x => x.Url).Returns(new Uri("https://example.org")); var context = new Mock <HttpContextBase>(); context.SetupGet(x => x.Request).Returns(request.Object); ControllerContext = new ControllerContext(context.Object, new RouteData(), this); }
public DeleteSeasonSurfaceController(IUmbracoContextAccessor umbracoContextAccessor, IUmbracoDatabaseFactory umbracoDatabaseFactory, ServiceContext serviceContext, AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger, UmbracoHelper umbracoHelper, ISeasonDataSource seasonDataSource, ISeasonRepository seasonRepository, IMatchListingDataSource matchDataSource, IAuthorizationPolicy <Competition> authorizationPolicy) : base(umbracoContextAccessor, umbracoDatabaseFactory, serviceContext, appCaches, logger, profilingLogger, umbracoHelper) { _seasonDataSource = seasonDataSource ?? throw new ArgumentNullException(nameof(seasonDataSource)); _seasonRepository = seasonRepository ?? throw new ArgumentNullException(nameof(seasonRepository)); _matchDataSource = matchDataSource ?? throw new ArgumentNullException(nameof(matchDataSource)); _authorizationPolicy = authorizationPolicy ?? throw new ArgumentNullException(nameof(authorizationPolicy)); }
public EditTransientTeamSurfaceController(IUmbracoContextAccessor umbracoContextAccessor, IUmbracoDatabaseFactory umbracoDatabaseFactory, ServiceContext serviceContext, AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger, UmbracoHelper umbracoHelper, ITeamDataSource teamDataSource, ITeamRepository teamRepository, IMatchListingDataSource matchDataSource, IAuthorizationPolicy <Team> authorizationPolicy, IDateTimeFormatter dateFormatter) : base(umbracoContextAccessor, umbracoDatabaseFactory, serviceContext, appCaches, logger, profilingLogger, umbracoHelper) { _teamDataSource = teamDataSource; _teamRepository = teamRepository ?? throw new ArgumentNullException(nameof(teamRepository)); _matchDataSource = matchDataSource ?? throw new ArgumentNullException(nameof(matchDataSource)); _authorizationPolicy = authorizationPolicy ?? throw new ArgumentNullException(nameof(authorizationPolicy)); _dateFormatter = dateFormatter ?? throw new ArgumentNullException(nameof(dateFormatter)); }
public DeleteTeamSurfaceController(IUmbracoContextAccessor umbracoContextAccessor, IUmbracoDatabaseFactory umbracoDatabaseFactory, ServiceContext serviceContext, AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger, UmbracoHelper umbracoHelper, ITeamDataSource teamDataSource, ITeamRepository teamRepository, IMatchListingDataSource matchDataSource, IPlayerDataSource playerDataSource, IAuthorizationPolicy <Team> authorizationPolicy, ICacheOverride cacheOverride) : base(umbracoContextAccessor, umbracoDatabaseFactory, serviceContext, appCaches, logger, profilingLogger, umbracoHelper) { _teamDataSource = teamDataSource ?? throw new ArgumentNullException(nameof(teamDataSource)); _teamRepository = teamRepository ?? throw new ArgumentNullException(nameof(teamRepository)); _matchDataSource = matchDataSource ?? throw new ArgumentNullException(nameof(matchDataSource)); _playerDataSource = playerDataSource ?? throw new ArgumentNullException(nameof(playerDataSource)); _authorizationPolicy = authorizationPolicy ?? throw new ArgumentNullException(nameof(authorizationPolicy)); _cacheOverride = cacheOverride ?? throw new ArgumentNullException(nameof(cacheOverride)); }
public DeleteTournamentSurfaceController(IUmbracoContextAccessor umbracoContextAccessor, IUmbracoDatabaseFactory umbracoDatabaseFactory, ServiceContext serviceContext, AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger, UmbracoHelper umbracoHelper, ITournamentDataSource tournamentDataSource, IMatchListingDataSource matchListingDataSource, ITournamentRepository tournamentRepository, ICacheClearer <Tournament> cacheClearer, ICommentsDataSource <Tournament> matchCommentsDataSource, IAuthorizationPolicy <Tournament> authorizationPolicy, IDateTimeFormatter dateTimeFormatter) : base(umbracoContextAccessor, umbracoDatabaseFactory, serviceContext, appCaches, logger, profilingLogger, umbracoHelper) { _tournamentDataSource = tournamentDataSource ?? throw new ArgumentNullException(nameof(tournamentDataSource)); _matchListingDataSource = matchListingDataSource ?? throw new ArgumentNullException(nameof(matchListingDataSource)); _tournamentRepository = tournamentRepository ?? throw new ArgumentNullException(nameof(tournamentRepository)); _cacheClearer = cacheClearer ?? throw new ArgumentNullException(nameof(cacheClearer)); _commentsDataSource = matchCommentsDataSource ?? throw new ArgumentNullException(nameof(matchCommentsDataSource)); _authorizationPolicy = authorizationPolicy ?? throw new ArgumentNullException(nameof(authorizationPolicy)); _dateTimeFormatter = dateTimeFormatter ?? throw new ArgumentNullException(nameof(dateTimeFormatter)); }
public DeleteMatchLocationController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ServiceContext serviceContext, AppCaches appCaches, IProfilingLogger profilingLogger, UmbracoHelper umbracoHelper, IMatchLocationDataSource matchLocationDataSource, IMatchListingDataSource matchDataSource, IAuthorizationPolicy <MatchLocation> authorizationPolicy) : base(globalSettings, umbracoContextAccessor, serviceContext, appCaches, profilingLogger, umbracoHelper) { _matchLocationDataSource = matchLocationDataSource ?? throw new System.ArgumentNullException(nameof(matchLocationDataSource)); _matchDataSource = matchDataSource ?? throw new System.ArgumentNullException(nameof(matchDataSource)); _authorizationPolicy = authorizationPolicy ?? throw new ArgumentNullException(nameof(authorizationPolicy)); }
public EditStatisticsSurfaceController(IUmbracoContextAccessor umbracoContextAccessor, IUmbracoDatabaseFactory umbracoDatabaseFactory, ServiceContext serviceContext, AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger, UmbracoHelper umbracoHelper, IDatabaseConnectionFactory databaseConnectionFactory, IBackgroundTaskTracker taskTracker, IMatchListingDataSource matchListingDataSource, IMatchDataSource matchDataSource, IStatisticsRepository statisticsRepository, IBowlingFiguresCalculator bowlingFiguresCalculator, IPlayerInMatchStatisticsBuilder playerInMatchStatisticsBuilder, IPlayerIdentityFinder playerIdentityFinder) : base(umbracoContextAccessor, umbracoDatabaseFactory, serviceContext, appCaches, logger, profilingLogger, umbracoHelper) { _databaseConnectionFactory = databaseConnectionFactory ?? throw new ArgumentNullException(nameof(databaseConnectionFactory)); _taskTracker = taskTracker ?? throw new ArgumentNullException(nameof(taskTracker)); _matchListingDataSource = matchListingDataSource ?? throw new ArgumentNullException(nameof(matchListingDataSource)); _matchDataSource = matchDataSource ?? throw new ArgumentNullException(nameof(matchDataSource)); _statisticsRepository = statisticsRepository ?? throw new ArgumentNullException(nameof(statisticsRepository)); _bowlingFiguresCalculator = bowlingFiguresCalculator ?? throw new ArgumentNullException(nameof(bowlingFiguresCalculator)); _playerInMatchStatisticsBuilder = playerInMatchStatisticsBuilder ?? throw new ArgumentNullException(nameof(playerInMatchStatisticsBuilder)); _playerIdentityFinder = playerIdentityFinder ?? throw new ArgumentNullException(nameof(playerIdentityFinder)); }
public TournamentActionsController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ServiceContext serviceContext, AppCaches appCaches, IProfilingLogger profilingLogger, UmbracoHelper umbracoHelper, ITournamentDataSource tournamentDataSource, IMatchListingDataSource matchDataSource, IAuthorizationPolicy <Tournament> authorizationPolicy, IDateTimeFormatter dateFormatter) : base(globalSettings, umbracoContextAccessor, serviceContext, appCaches, profilingLogger, umbracoHelper) { _tournamentDataSource = tournamentDataSource ?? throw new System.ArgumentNullException(nameof(tournamentDataSource)); _matchDataSource = matchDataSource ?? throw new System.ArgumentNullException(nameof(matchDataSource)); _authorizationPolicy = authorizationPolicy ?? throw new System.ArgumentNullException(nameof(authorizationPolicy)); _dateFormatter = dateFormatter ?? throw new System.ArgumentNullException(nameof(dateFormatter)); }
public MatchesController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ServiceContext serviceContext, AppCaches appCaches, IProfilingLogger profilingLogger, UmbracoHelper umbracoHelper, IMatchListingDataSource matchesDataSource, IDateTimeFormatter dateTimeFormatter, IMatchFilterQueryStringParser matchFilterQueryStringParser, IMatchFilterHumanizer matchFilterHumanizer) : base(globalSettings, umbracoContextAccessor, serviceContext, appCaches, profilingLogger, umbracoHelper) { _matchesDataSource = matchesDataSource ?? throw new ArgumentNullException(nameof(matchesDataSource)); _dateTimeFormatter = dateTimeFormatter ?? throw new ArgumentNullException(nameof(dateTimeFormatter)); _matchFilterQueryStringParser = matchFilterQueryStringParser ?? throw new ArgumentNullException(nameof(matchFilterQueryStringParser)); _matchFilterHumanizer = matchFilterHumanizer ?? throw new ArgumentNullException(nameof(matchFilterHumanizer)); }
public TransientTeamController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ServiceContext serviceContext, AppCaches appCaches, IProfilingLogger profilingLogger, UmbracoHelper umbracoHelper, ITeamDataSource teamDataSource, IMatchListingDataSource matchDataSource, IAuthorizationPolicy <Team> authorizationPolicy, IDateTimeFormatter dateFormatter, IEmailProtector emailProtector) : base(globalSettings, umbracoContextAccessor, serviceContext, appCaches, profilingLogger, umbracoHelper) { _teamDataSource = teamDataSource ?? throw new ArgumentNullException(nameof(teamDataSource)); _matchDataSource = matchDataSource ?? throw new ArgumentNullException(nameof(matchDataSource)); _authorizationPolicy = authorizationPolicy ?? throw new ArgumentNullException(nameof(authorizationPolicy)); _dateFormatter = dateFormatter ?? throw new ArgumentNullException(nameof(dateFormatter)); _emailProtector = emailProtector ?? throw new ArgumentNullException(nameof(emailProtector)); }
public MatchesForSeasonController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ServiceContext serviceContext, AppCaches appCaches, IProfilingLogger profilingLogger, UmbracoHelper umbracoHelper, IMatchFilterFactory matchFilterFactory, ISeasonDataSource seasonDataSource, IMatchListingDataSource matchDataSource, IAuthorizationPolicy <Competition> authorizationPolicy, IDateTimeFormatter dateFormatter) : base(globalSettings, umbracoContextAccessor, serviceContext, appCaches, profilingLogger, umbracoHelper) { _matchFilterFactory = matchFilterFactory ?? throw new ArgumentNullException(nameof(matchFilterFactory)); _seasonDataSource = seasonDataSource ?? throw new ArgumentNullException(nameof(seasonDataSource)); _matchDataSource = matchDataSource ?? throw new ArgumentNullException(nameof(matchDataSource)); _authorizationPolicy = authorizationPolicy ?? throw new ArgumentNullException(nameof(authorizationPolicy)); _dateFormatter = dateFormatter ?? throw new ArgumentNullException(nameof(dateFormatter)); }
public TestController(IMatchListingDataSource matchesDataSource, IMatchFilterQueryStringParser matchFilterUrlParser, IMatchFilterHumanizer matchFilterHumanizer) : base( Mock.Of <IGlobalSettings>(), Mock.Of <IUmbracoContextAccessor>(), null, AppCaches.NoCache, Mock.Of <IProfilingLogger>(), null, matchesDataSource, Mock.Of <IDateTimeFormatter>(), matchFilterUrlParser, matchFilterHumanizer) { var request = new Mock <HttpRequestBase>(); request.SetupGet(x => x.Url).Returns(new Uri("https://example.org")); request.SetupGet(x => x.QueryString).Returns(HttpUtility.ParseQueryString(string.Empty)); var context = new Mock <HttpContextBase>(); context.SetupGet(x => x.Request).Returns(request.Object); ControllerContext = new ControllerContext(context.Object, new RouteData(), this); }
public OnlySportCsvExportTask(IBackgroundTaskRunner <RecurringTaskBase> runner, int delayBeforeWeStart, int howOftenWeRepeat, IProfilingLogger logger, IMatchListingDataSource matchDataSource) : base(runner, delayBeforeWeStart, howOftenWeRepeat) { _logger = logger ?? throw new System.ArgumentNullException(nameof(logger)); _matchDataSource = matchDataSource ?? throw new System.ArgumentNullException(nameof(matchDataSource)); }
public OnlySportCsvExportComponent(IProfilingLogger logger, IMatchListingDataSource matchDataSource) { _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _matchDataSource = matchDataSource ?? throw new ArgumentNullException(nameof(matchDataSource)); _taskRunner = new BackgroundTaskRunner <IBackgroundTask>(nameof(OnlySportCsvExportTask), _logger); }