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(ITournamentDataSource tournamentDataSource, ISeasonDataSource seasonDataSource, Uri requestUrl, UmbracoHelper umbracoHelper) : base( Mock.Of <IGlobalSettings>(), Mock.Of <IUmbracoContextAccessor>(), null, AppCaches.NoCache, Mock.Of <IProfilingLogger>(), umbracoHelper, tournamentDataSource, seasonDataSource, Mock.Of <IAuthorizationPolicy <Tournament> >(), Mock.Of <ISeasonEstimator>(), Mock.Of <IDateTimeFormatter>()) { var request = new Mock <HttpRequestBase>(); request.SetupGet(x => x.Url).Returns(requestUrl); 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 TestController(ITournamentDataSource tournamentDataSource, IMatchListingDataSource matchDataSource, ICommentsDataSource <Tournament> commentsDataSource, UmbracoHelper umbracoHelper) : base( Mock.Of <IGlobalSettings>(), Mock.Of <IUmbracoContextAccessor>(), null, AppCaches.NoCache, Mock.Of <IProfilingLogger>(), umbracoHelper, tournamentDataSource, matchDataSource, Mock.Of <IMatchFilterFactory>(), commentsDataSource, Mock.Of <IAuthorizationPolicy <Tournament> >(), Mock.Of <IDateTimeFormatter>(), Mock.Of <IEmailProtector>(), Mock.Of <IBadLanguageFilter>()) { 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 EditTournamentSeasonsSurfaceController(IUmbracoContextAccessor umbracoContextAccessor, IUmbracoDatabaseFactory umbracoDatabaseFactory, ServiceContext serviceContext, AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger, UmbracoHelper umbracoHelper, ITournamentDataSource tournamentDataSource, ICacheClearer <Tournament> cacheClearer, ITournamentRepository tournamentRepository, IAuthorizationPolicy <Tournament> authorizationPolicy, IPostSaveRedirector postSaveRedirector) : base(umbracoContextAccessor, umbracoDatabaseFactory, serviceContext, appCaches, logger, profilingLogger, umbracoHelper) { _tournamentDataSource = tournamentDataSource ?? throw new ArgumentNullException(nameof(tournamentDataSource)); _cacheClearer = cacheClearer ?? throw new ArgumentNullException(nameof(cacheClearer)); _tournamentRepository = tournamentRepository ?? throw new ArgumentNullException(nameof(tournamentRepository)); _authorizationPolicy = authorizationPolicy ?? throw new ArgumentNullException(nameof(authorizationPolicy)); _postSaveRedirector = postSaveRedirector ?? throw new ArgumentNullException(nameof(postSaveRedirector)); }
public EditTournamentSurfaceController(IUmbracoContextAccessor umbracoContextAccessor, IUmbracoDatabaseFactory umbracoDatabaseFactory, ServiceContext serviceContext, AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger, UmbracoHelper umbracoHelper, ITournamentDataSource tournamentDataSource, ICacheClearer <Tournament> cacheClearer, ITournamentRepository tournamentRepository, IAuthorizationPolicy <Tournament> authorizationPolicy, IDateTimeFormatter dateTimeFormatter, IMatchValidator matchValidator) : base(umbracoContextAccessor, umbracoDatabaseFactory, serviceContext, appCaches, logger, profilingLogger, umbracoHelper) { _tournamentDataSource = tournamentDataSource ?? throw new ArgumentNullException(nameof(tournamentDataSource)); _cacheClearer = cacheClearer ?? throw new ArgumentNullException(nameof(cacheClearer)); _tournamentRepository = tournamentRepository ?? throw new ArgumentNullException(nameof(tournamentRepository)); _authorizationPolicy = authorizationPolicy ?? throw new ArgumentNullException(nameof(authorizationPolicy)); _dateTimeFormatter = dateTimeFormatter ?? throw new ArgumentNullException(nameof(dateTimeFormatter)); _matchValidator = matchValidator ?? throw new ArgumentNullException(nameof(matchValidator)); }
public EditTournamentController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ServiceContext serviceContext, AppCaches appCaches, IProfilingLogger profilingLogger, UmbracoHelper umbracoHelper, ITournamentDataSource tournamentDataSource, IAuthorizationPolicy <Tournament> authorizationPolicy, IDateTimeFormatter dateFormatter) : base(globalSettings, umbracoContextAccessor, serviceContext, appCaches, profilingLogger, umbracoHelper) { _tournamentDataSource = tournamentDataSource ?? throw new ArgumentNullException(nameof(tournamentDataSource)); _authorizationPolicy = authorizationPolicy ?? throw new ArgumentNullException(nameof(authorizationPolicy)); _dateFormatter = dateFormatter ?? throw new ArgumentNullException(nameof(dateFormatter)); }
public DeleteTournamentController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ServiceContext serviceContext, AppCaches appCaches, IProfilingLogger profilingLogger, UmbracoHelper umbracoHelper, ITournamentDataSource tournamentDataSource, IMatchListingDataSource matchDataSource, ICommentsDataSource <Tournament> tournamentCommentsDataSource, IAuthorizationPolicy <Tournament> authorizationPolicy, IDateTimeFormatter dateFormatter) : base(globalSettings, umbracoContextAccessor, serviceContext, appCaches, profilingLogger, umbracoHelper) { _tournamentDataSource = tournamentDataSource ?? throw new System.ArgumentNullException(nameof(tournamentDataSource)); _matchDataSource = matchDataSource ?? throw new ArgumentNullException(nameof(matchDataSource)); _tournamentCommentsDataSource = tournamentCommentsDataSource; _authorizationPolicy = authorizationPolicy; _dateFormatter = dateFormatter ?? throw new ArgumentNullException(nameof(dateFormatter)); }