public TestController(ITeamDataSource teamDataSource, ISeasonDataSource seasonDataSource, ICreateMatchSeasonSelector createMatchSeasonSelector, IEditMatchHelper editMatchHelper, Uri requestUrl,
                                  IAuthorizationPolicy <Competition> competitionAuthorizationPolicy)
                : base(
                    Mock.Of <IGlobalSettings>(),
                    Mock.Of <IUmbracoContextAccessor>(),
                    null,
                    AppCaches.NoCache,
                    Mock.Of <IProfilingLogger>(),
                    null,
                    teamDataSource,
                    seasonDataSource,
                    createMatchSeasonSelector,
                    editMatchHelper,
                    competitionAuthorizationPolicy)
            {
                var request = new Mock <HttpRequestBase>();

                request.SetupGet(x => x.RawUrl).Returns(requestUrl.AbsolutePath);

                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 TestController(ITeamDataSource teamDataSource, ISeasonDataSource seasonDataSource, Uri requestUrl)
                : base(
                    Mock.Of <IGlobalSettings>(),
                    Mock.Of <IUmbracoContextAccessor>(),
                    null,
                    AppCaches.NoCache,
                    Mock.Of <IProfilingLogger>(),
                    null,
                    teamDataSource,
                    seasonDataSource)
            {
                var request = new Mock <HttpRequestBase>();

                request.SetupGet(x => x.RawUrl).Returns(requestUrl.AbsolutePath);

                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 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 TestController(ITeamDataSource teamDataSource,
                                  IBestPerformanceInAMatchStatisticsDataSource bestPerformanceDataSource,
                                  IInningsStatisticsDataSource inningsStatisticsDataSource,
                                  IStatisticsFilterQueryStringParser statisticsFilterQueryStringParser,
                                  UmbracoHelper umbracoHelper)
                : base(
                    Mock.Of <IGlobalSettings>(),
                    Mock.Of <IUmbracoContextAccessor>(),
                    null,
                    AppCaches.NoCache,
                    Mock.Of <IProfilingLogger>(),
                    umbracoHelper,
                    teamDataSource,
                    bestPerformanceDataSource,
                    inningsStatisticsDataSource,
                    Mock.Of <IBestPlayerTotalStatisticsDataSource>(),
                    statisticsFilterQueryStringParser,
                    Mock.Of <IStatisticsFilterHumanizer>())
            {
                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 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 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));
 }
Esempio n. 7
0
 public SpogoCsvExportComponent(IProfilingLogger logger, ITeamDataSource teamDataSource, IContactDetailsParser contactDetailsParser)
 {
     _logger               = logger ?? throw new ArgumentNullException(nameof(logger));
     _teamDataSource       = teamDataSource ?? throw new ArgumentNullException(nameof(teamDataSource));
     _contactDetailsParser = contactDetailsParser ?? throw new ArgumentNullException(nameof(contactDetailsParser));
     _taskRunner           = new BackgroundTaskRunner <IBackgroundTask>(nameof(SpogoCsvExportTask), _logger);
 }
            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 SpogoCsvExportTask(IBackgroundTaskRunner <RecurringTaskBase> runner, int delayBeforeWeStart, int howOftenWeRepeat, IProfilingLogger logger, ITeamDataSource teamDataSource,
                           IContactDetailsParser contactDetailsParser)
     : base(runner, delayBeforeWeStart, howOftenWeRepeat)
 {
     _logger               = logger ?? throw new System.ArgumentNullException(nameof(logger));
     _teamDataSource       = teamDataSource ?? throw new System.ArgumentNullException(nameof(teamDataSource));
     _contactDetailsParser = contactDetailsParser ?? throw new System.ArgumentNullException(nameof(contactDetailsParser));
 }
Esempio n. 10
0
 public EditTeamSurfaceController(IUmbracoContextAccessor umbracoContextAccessor, IUmbracoDatabaseFactory umbracoDatabaseFactory, ServiceContext serviceContext,
                                  AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger, UmbracoHelper umbracoHelper, ITeamDataSource teamDataSource, ITeamRepository teamRepository,
                                  IAuthorizationPolicy <Team> authorizationPolicy, ICacheOverride cacheOverride)
     : base(umbracoContextAccessor, umbracoDatabaseFactory, serviceContext, appCaches, logger, profilingLogger, umbracoHelper)
 {
     _teamDataSource      = teamDataSource;
     _teamRepository      = teamRepository ?? throw new System.ArgumentNullException(nameof(teamRepository));
     _authorizationPolicy = authorizationPolicy ?? throw new System.ArgumentNullException(nameof(authorizationPolicy));
     _cacheOverride       = cacheOverride ?? throw new ArgumentNullException(nameof(cacheOverride));
 }
 public CreateTournamentSurfaceController(IUmbracoContextAccessor umbracoContextAccessor, IUmbracoDatabaseFactory umbracoDatabaseFactory, ServiceContext serviceContext,
                                          AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger, UmbracoHelper umbracoHelper, ITournamentRepository tournamentRepository,
                                          ITeamDataSource teamDataSource, ISeasonDataSource seasonDataSource, IMatchValidator matchValidator, ICacheClearer <Tournament> cacheClearer)
     : base(umbracoContextAccessor, umbracoDatabaseFactory, serviceContext, appCaches, logger, profilingLogger, umbracoHelper)
 {
     _tournamentRepository = tournamentRepository ?? throw new ArgumentNullException(nameof(tournamentRepository));
     _teamDataSource       = teamDataSource ?? throw new ArgumentNullException(nameof(teamDataSource));
     _seasonDataSource     = seasonDataSource ?? throw new ArgumentNullException(nameof(seasonDataSource));
     _matchValidator       = matchValidator ?? throw new ArgumentNullException(nameof(matchValidator));
     _cacheClearer         = cacheClearer ?? throw new ArgumentNullException(nameof(cacheClearer));
 }
Esempio n. 12
0
 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 TeamActionsController(IGlobalSettings globalSettings,
                              IUmbracoContextAccessor umbracoContextAccessor,
                              ServiceContext serviceContext,
                              AppCaches appCaches,
                              IProfilingLogger profilingLogger,
                              UmbracoHelper umbracoHelper,
                              ITeamDataSource teamDataSource,
                              IAuthorizationPolicy <Team> authorizationPolicy)
     : base(globalSettings, umbracoContextAccessor, serviceContext, appCaches, profilingLogger, umbracoHelper)
 {
     _teamDataSource      = teamDataSource ?? throw new System.ArgumentNullException(nameof(teamDataSource));
     _authorizationPolicy = authorizationPolicy ?? throw new System.ArgumentNullException(nameof(authorizationPolicy));
 }
 public DeleteCompetitionSurfaceController(IUmbracoContextAccessor umbracoContextAccessor, IUmbracoDatabaseFactory umbracoDatabaseFactory, ServiceContext serviceContext,
                                           AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger, UmbracoHelper umbracoHelper, ICompetitionDataSource competitionDataSource,
                                           ICompetitionRepository competitionRepository, IMatchListingDataSource matchDataSource, ITeamDataSource teamDataSource, IAuthorizationPolicy <Competition> authorizationPolicy,
                                           ICacheOverride cacheOverride)
     : base(umbracoContextAccessor, umbracoDatabaseFactory, serviceContext, appCaches, logger, profilingLogger, umbracoHelper)
 {
     _competitionDataSource = competitionDataSource ?? throw new ArgumentNullException(nameof(competitionDataSource));
     _competitionRepository = competitionRepository ?? throw new ArgumentNullException(nameof(competitionRepository));
     _matchDataSource       = matchDataSource ?? throw new ArgumentNullException(nameof(matchDataSource));
     _teamDataSource        = teamDataSource ?? throw new ArgumentNullException(nameof(teamDataSource));
     _authorizationPolicy   = authorizationPolicy ?? throw new ArgumentNullException(nameof(authorizationPolicy));
     _cacheOverride         = cacheOverride ?? throw new ArgumentNullException(nameof(cacheOverride));
 }
Esempio n. 15
0
 public CreateTournamentController(IGlobalSettings globalSettings,
                                   IUmbracoContextAccessor umbracoContextAccessor,
                                   ServiceContext serviceContext,
                                   AppCaches appCaches,
                                   IProfilingLogger profilingLogger,
                                   UmbracoHelper umbracoHelper,
                                   ITeamDataSource teamDataSource,
                                   ISeasonDataSource seasonDataSource)
     : base(globalSettings, umbracoContextAccessor, serviceContext, appCaches, profilingLogger, umbracoHelper)
 {
     _teamDataSource   = teamDataSource ?? throw new ArgumentNullException(nameof(teamDataSource));
     _seasonDataSource = seasonDataSource ?? throw new ArgumentNullException(nameof(seasonDataSource));
 }
Esempio n. 16
0
 public CreateLeagueMatchSurfaceController(IUmbracoContextAccessor umbracoContextAccessor, IUmbracoDatabaseFactory umbracoDatabaseFactory, ServiceContext serviceContext,
                                           AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger, UmbracoHelper umbracoHelper, IMatchRepository matchRepository, ITeamDataSource teamDataSource,
                                           ISeasonDataSource seasonDataSource, ICreateMatchSeasonSelector createMatchSeasonSelector, IEditMatchHelper editMatchHelper, IMatchValidator matchValidator,
                                           ICacheClearer <Match> cacheClearer)
     : base(umbracoContextAccessor, umbracoDatabaseFactory, serviceContext, appCaches, logger, profilingLogger, umbracoHelper)
 {
     _matchRepository           = matchRepository ?? throw new ArgumentNullException(nameof(matchRepository));
     _teamDataSource            = teamDataSource ?? throw new ArgumentNullException(nameof(teamDataSource));
     _seasonDataSource          = seasonDataSource ?? throw new ArgumentNullException(nameof(seasonDataSource));
     _createMatchSeasonSelector = createMatchSeasonSelector ?? throw new ArgumentNullException(nameof(createMatchSeasonSelector));
     _editMatchHelper           = editMatchHelper ?? throw new ArgumentNullException(nameof(editMatchHelper));
     _matchValidator            = matchValidator ?? throw new ArgumentNullException(nameof(matchValidator));
     _cacheClearer = cacheClearer ?? throw new ArgumentNullException(nameof(cacheClearer));
 }
 public CreateTrainingSessionController(IGlobalSettings globalSettings,
                                        IUmbracoContextAccessor umbracoContextAccessor,
                                        ServiceContext serviceContext,
                                        AppCaches appCaches,
                                        IProfilingLogger profilingLogger,
                                        UmbracoHelper umbracoHelper,
                                        ITeamDataSource teamDataSource,
                                        ISeasonDataSource seasonDataSource,
                                        ICreateMatchSeasonSelector createMatchSeasonSelector,
                                        IEditMatchHelper editMatchHelper)
     : base(globalSettings, umbracoContextAccessor, serviceContext, appCaches, profilingLogger, umbracoHelper)
 {
     _teamDataSource            = teamDataSource ?? throw new ArgumentNullException(nameof(teamDataSource));
     _seasonDataSource          = seasonDataSource ?? throw new ArgumentNullException(nameof(seasonDataSource));
     _createMatchSeasonSelector = createMatchSeasonSelector ?? throw new ArgumentNullException(nameof(createMatchSeasonSelector));
     _editMatchHelper           = editMatchHelper ?? throw new ArgumentNullException(nameof(editMatchHelper));
 }
Esempio n. 18
0
 public DeleteTeamController(IGlobalSettings globalSettings,
                             IUmbracoContextAccessor umbracoContextAccessor,
                             ServiceContext serviceContext,
                             AppCaches appCaches,
                             IProfilingLogger profilingLogger,
                             UmbracoHelper umbracoHelper,
                             ITeamDataSource teamDataSource,
                             IMatchListingDataSource matchDataSource,
                             IPlayerDataSource playerDataSource,
                             IAuthorizationPolicy <Team> authorizationPolicy)
     : base(globalSettings, umbracoContextAccessor, serviceContext, appCaches, profilingLogger, umbracoHelper)
 {
     _teamDataSource      = teamDataSource ?? throw new ArgumentNullException(nameof(teamDataSource));
     _matchDataSource     = matchDataSource ?? throw new ArgumentNullException(nameof(matchDataSource));
     _playerDataSource    = playerDataSource ?? throw new ArgumentNullException(nameof(playerDataSource));
     _authorizationPolicy = authorizationPolicy ?? throw new ArgumentNullException(nameof(authorizationPolicy));
 }
 public EditTransientTeamController(IGlobalSettings globalSettings,
                                    IUmbracoContextAccessor umbracoContextAccessor,
                                    ServiceContext serviceContext,
                                    AppCaches appCaches,
                                    IProfilingLogger profilingLogger,
                                    UmbracoHelper umbracoHelper,
                                    ITeamDataSource teamDataSource,
                                    IMatchListingDataSource matchDataSource,
                                    IAuthorizationPolicy <Team> authorizationPolicy,
                                    IDateTimeFormatter dateFormatter)
     : 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));
 }
Esempio n. 20
0
 public StatisticsFilterFactory(
     IStoolballEntityRouteParser stoolballEntityRouteParser,
     IPlayerDataSource playerDataSource,
     IClubDataSource clubDataSource,
     ITeamDataSource teamDataSource,
     IMatchLocationDataSource matchLocationDataSource,
     ICompetitionDataSource competitionDataSource,
     ISeasonDataSource seasonDataSource,
     IRouteNormaliser routeNormaliser)
 {
     _stoolballEntityRouteParser = stoolballEntityRouteParser ?? throw new ArgumentNullException(nameof(stoolballEntityRouteParser));
     _playerDataSource           = playerDataSource ?? throw new ArgumentNullException(nameof(playerDataSource));
     _clubDataSource             = clubDataSource ?? throw new ArgumentNullException(nameof(clubDataSource));
     _teamDataSource             = teamDataSource ?? throw new ArgumentNullException(nameof(teamDataSource));
     _matchLocationDataSource    = matchLocationDataSource ?? throw new ArgumentNullException(nameof(matchLocationDataSource));
     _competitionDataSource      = competitionDataSource ?? throw new ArgumentNullException(nameof(competitionDataSource));
     _seasonDataSource           = seasonDataSource ?? throw new ArgumentNullException(nameof(seasonDataSource));
     _routeNormaliser            = routeNormaliser ?? throw new ArgumentNullException(nameof(routeNormaliser));
 }
 public TeamStatisticsController(IGlobalSettings globalSettings,
                                 IUmbracoContextAccessor umbracoContextAccessor,
                                 ServiceContext serviceContext,
                                 AppCaches appCaches,
                                 IProfilingLogger profilingLogger,
                                 UmbracoHelper umbracoHelper,
                                 ITeamDataSource teamDataSource,
                                 IBestPerformanceInAMatchStatisticsDataSource bestPerformanceDataSource,
                                 IInningsStatisticsDataSource inningsStatisticsDataSource,
                                 IBestPlayerTotalStatisticsDataSource bestPlayerTotalDataSource,
                                 IStatisticsFilterQueryStringParser statisticsFilterQueryStringParser,
                                 IStatisticsFilterHumanizer statisticsFilterHumanizer)
     : base(globalSettings, umbracoContextAccessor, serviceContext, appCaches, profilingLogger, umbracoHelper)
 {
     _teamDataSource                    = teamDataSource ?? throw new ArgumentNullException(nameof(teamDataSource));
     _bestPerformanceDataSource         = bestPerformanceDataSource ?? throw new ArgumentNullException(nameof(bestPerformanceDataSource));
     _inningsStatisticsDataSource       = inningsStatisticsDataSource ?? throw new ArgumentNullException(nameof(inningsStatisticsDataSource));
     _bestPlayerTotalDataSource         = bestPlayerTotalDataSource ?? throw new ArgumentNullException(nameof(bestPlayerTotalDataSource));
     _statisticsFilterQueryStringParser = statisticsFilterQueryStringParser ?? throw new ArgumentNullException(nameof(statisticsFilterQueryStringParser));
     _statisticsFilterHumanizer         = statisticsFilterHumanizer ?? throw new ArgumentNullException(nameof(statisticsFilterHumanizer));
 }
            public TestController(ITeamDataSource teamDataSource, UmbracoHelper umbracoHelper)
                : base(
                    Mock.Of <IGlobalSettings>(),
                    Mock.Of <IUmbracoContextAccessor>(),
                    null,
                    AppCaches.NoCache,
                    Mock.Of <IProfilingLogger>(),
                    umbracoHelper,
                    teamDataSource,
                    Mock.Of <IAuthorizationPolicy <Team> >())
            {
                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 TeamsApiController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext serviceContext,
                           AppCaches appCaches, IProfilingLogger profilingLogger, IRuntimeState runtimeState, UmbracoHelper umbracoHelper, UmbracoMapper umbracoMapper, ITeamDataSource teamDataSource) :
     base(globalSettings, umbracoContextAccessor, sqlContext, serviceContext, appCaches, profilingLogger, runtimeState, umbracoHelper, umbracoMapper)
 {
     _teamDataSource = teamDataSource ?? throw new ArgumentNullException(nameof(teamDataSource));
 }