public void SetUp() { centresDataService = A.Fake <ICentresDataService>(); configService = A.Fake <IConfigService>(); var logger = A.Fake <ILogger <LearningSolutionsController> >(); var user = new ClaimsPrincipal( new ClaimsIdentity( new[] { new Claim("learnCandidateID", CandidateId.ToString()), new Claim("UserCentreID", CentreId.ToString()), }, "mock" ) ); controller = new LearningSolutionsController( configService, logger, centresDataService ) { ControllerContext = new ControllerContext { HttpContext = new DefaultHttpContext { User = user } }, }; }
public void Setup() { centresDataService = A.Fake <ICentresDataService>(); cryptoService = A.Fake <ICryptoService>(); jobGroupsDataService = A.Fake <IJobGroupsDataService>(); registrationService = A.Fake <IRegistrationService>(); userService = A.Fake <IUserService>(); promptsService = A.Fake <PromptsService>(); featureManager = A.Fake <IFeatureManager>(); supervisorDelegateService = A.Fake <ISupervisorDelegateService>(); request = A.Fake <HttpRequest>(); controller = new RegisterController( centresDataService, jobGroupsDataService, registrationService, cryptoService, userService, promptsService, featureManager, supervisorDelegateService ) .WithDefaultContext() .WithMockRequestContext(request) .WithMockServices() .WithMockTempData(); }
public CentreContractAdminUsageService( ICentresDataService centresDataService, IUserDataService userDataService ) { this.centresDataService = centresDataService; this.userDataService = userDataService; }
public LearningSolutionsController( IConfigService configService, ILogger <LearningSolutionsController> logger, ICentresDataService centresDataService ) { this.configService = configService; this.logger = logger; this.centresDataService = centresDataService; }
public ContractDetailsController( ICentresDataService centresDataService, IUserDataService userDataService, ICourseDataService courseDataService ) { this.centresDataService = centresDataService; this.userDataService = userDataService; this.courseDataService = courseDataService; }
public ConfigurationController( ICentresDataService centresDataService, IMapsApiHelper mapsApiHelper, ILogger <ConfigurationController> logger, IImageResizeService imageResizeService ) { this.centresDataService = centresDataService; this.mapsApiHelper = mapsApiHelper; this.logger = logger; this.imageResizeService = imageResizeService; }
public void SetUp() { actionPlanService = A.Fake <IActionPlanService>(); centresDataService = A.Fake <ICentresDataService>(); courseDataService = A.Fake <ICourseDataService>(); selfAssessmentService = A.Fake <ISelfAssessmentService>(); supervisorService = A.Fake <ISupervisorService>(); frameworkService = A.Fake <IFrameworkService>(); notificationService = A.Fake <INotificationService>(); frameworkNotificationService = A.Fake <IFrameworkNotificationService>(); candidateAssessmentDownloadFileService = A.Fake <ICandidateAssessmentDownloadFileService>(); var logger = A.Fake <ILogger <LearningPortalController> >(); config = A.Fake <IConfiguration>(); filteredApiHelperService = A.Fake <IFilteredApiHelperService>(); searchSortFilterPaginateService = A.Fake <ISearchSortFilterPaginateService>(); A.CallTo(() => config["CurrentSystemBaseUrl"]).Returns(BaseUrl); var user = new ClaimsPrincipal( new ClaimsIdentity( new[] { new Claim("learnCandidateID", CandidateId.ToString()), new Claim("UserCentreID", CentreId.ToString()), }, "mock" ) ); controller = new LearningPortalController( centresDataService, courseDataService, selfAssessmentService, supervisorService, frameworkService, notificationService, frameworkNotificationService, logger, config, actionPlanService, candidateAssessmentDownloadFileService, searchSortFilterPaginateService, multiPageFormService ); controller.ControllerContext = new ControllerContext { HttpContext = new DefaultHttpContext { User = user } }; controller = controller.WithMockTempData(); }
public RegisterAdminController( ICentresDataService centresDataService, ICryptoService cryptoService, IJobGroupsDataService jobGroupsDataService, IRegistrationService registrationService, IUserDataService userDataService ) { this.centresDataService = centresDataService; this.cryptoService = cryptoService; this.jobGroupsDataService = jobGroupsDataService; this.registrationService = registrationService; this.userDataService = userDataService; }
public DashboardInformationService( ISupportTicketDataService ticketDataService, IUserDataService userDataService, ICourseDataService courseDataService, ICentresService centresService, ICentresDataService centresDataService ) { this.ticketDataService = ticketDataService; this.userDataService = userDataService; this.courseDataService = courseDataService; this.centresService = centresService; this.centresDataService = centresDataService; }
public DashboardController( IUserDataService userDataService, ICentresDataService centresDataService, ICourseDataService courseDataService, ISupportTicketDataService ticketDataService, ICentresService centresService, ISystemNotificationsDataService systemNotificationsDataService ) { this.userDataService = userDataService; this.centresDataService = centresDataService; this.courseDataService = courseDataService; this.ticketDataService = ticketDataService; this.centresService = centresService; this.systemNotificationsDataService = systemNotificationsDataService; }
public void Setup() { supportTicketDataService = A.Fake <ISupportTicketDataService>(); userDataService = A.Fake <IUserDataService>(); centresDataService = A.Fake <ICentresDataService>(); centresService = A.Fake <ICentresService>(); courseDataService = A.Fake <ICourseDataService>(); centresDataService = A.Fake <ICentresDataService>(); dashboardInformationService = new DashboardInformationService( supportTicketDataService, userDataService, courseDataService, centresService, centresDataService ); }
public DelegateApprovalsService( IUserDataService userDataService, ICentreRegistrationPromptsService centreRegistrationPromptsService, IEmailService emailService, ICentresDataService centresDataService, ILogger <DelegateApprovalsService> logger, IConfiguration config ) { this.userDataService = userDataService; this.centreRegistrationPromptsService = centreRegistrationPromptsService; this.emailService = emailService; this.centresDataService = centresDataService; this.logger = logger; this.config = config; }
public void Setup() { centresDataService = A.Fake <ICentresDataService>(); cryptoService = A.Fake <ICryptoService>(); jobGroupsDataService = A.Fake <IJobGroupsDataService>(); registrationService = A.Fake <IRegistrationService>(); userDataService = A.Fake <IUserDataService>(); controller = new RegisterAdminController( centresDataService, cryptoService, jobGroupsDataService, registrationService, userDataService ) .WithDefaultContext() .WithMockTempData(); }
public void SetUp() { userDataService = A.Fake <IUserDataService>(); centreRegistrationPromptsService = A.Fake <ICentreRegistrationPromptsService>(); emailService = A.Fake <IEmailService>(); centresDataService = A.Fake <ICentresDataService>(); logger = A.Fake <ILogger <DelegateApprovalsService> >(); config = A.Fake <IConfiguration>(); delegateApprovalsService = new DelegateApprovalsService( userDataService, centreRegistrationPromptsService, emailService, centresDataService, logger, config ); }
public RegisterController( ICentresDataService centresDataService, IJobGroupsDataService jobGroupsDataService, IRegistrationService registrationService, ICryptoService cryptoService, IUserService userService, CentreCustomPromptHelper centreCustomPromptHelper, IFeatureManager featureManager, ISupervisorDelegateService supervisorDelegateService ) { this.centresDataService = centresDataService; this.jobGroupsDataService = jobGroupsDataService; this.registrationService = registrationService; this.cryptoService = cryptoService; this.userService = userService; this.centreCustomPromptHelper = centreCustomPromptHelper; this.featureManager = featureManager; this.supervisorDelegateService = supervisorDelegateService; }
public LearningPortalController( ICentresDataService centresDataService, ICourseDataService courseDataService, ISelfAssessmentService selfAssessmentService, ISupervisorService supervisorService, INotificationService notificationService, IFrameworkNotificationService frameworkNotificationService, ILogger <LearningPortalController> logger, IConfiguration config, IActionPlanService actionPlanService ) { this.centresDataService = centresDataService; this.courseDataService = courseDataService; this.selfAssessmentService = selfAssessmentService; this.supervisorService = supervisorService; this.notificationService = notificationService; this.frameworkNotificationService = frameworkNotificationService; this.logger = logger; this.config = config; this.actionPlanService = actionPlanService; }
public void Setup() { centresDataService = A.Fake <ICentresDataService>(); clockService = A.Fake <IClockService>(); centresService = new CentresService(centresDataService, clockService); A.CallTo(() => clockService.UtcNow).Returns(new DateTime(2021, 1, 1)); A.CallTo(() => centresDataService.GetCentreRanks(A <DateTime> ._, A <int?> ._, 10, A <int> ._)).Returns( new[] { CentreTestHelper.GetCentreRank(1), CentreTestHelper.GetCentreRank(2), CentreTestHelper.GetCentreRank(3), CentreTestHelper.GetCentreRank(4), CentreTestHelper.GetCentreRank(5), CentreTestHelper.GetCentreRank(6), CentreTestHelper.GetCentreRank(7), CentreTestHelper.GetCentreRank(8), CentreTestHelper.GetCentreRank(9), CentreTestHelper.GetCentreRank(10), } ); }
public void Setup() { registrationDataService = A.Fake <IRegistrationDataService>(); passwordDataService = A.Fake <IPasswordDataService>(); passwordResetService = A.Fake <IPasswordResetService>(); emailService = A.Fake <IEmailService>(); centresDataService = A.Fake <ICentresDataService>(); config = A.Fake <IConfiguration>(); supervisorDelegateService = A.Fake <ISupervisorDelegateService>(); frameworkNotificationService = A.Fake <IFrameworkNotificationService>(); userDataService = A.Fake <IUserDataService>(); A.CallTo(() => config["CurrentSystemBaseUrl"]).Returns(OldSystemBaseUrl); A.CallTo(() => config["AppRootPath"]).Returns(RefactoredSystemBaseUrl); A.CallTo(() => centresDataService.GetCentreIpPrefixes(RegistrationModelTestHelper.Centre)) .Returns(new[] { ApprovedIpPrefix }); A.CallTo(() => centresDataService.GetCentreManagerDetails(A <int> ._)) .Returns(("Test", "Approver", ApproverEmail)); A.CallTo(() => registrationDataService.RegisterDelegate(A <DelegateRegistrationModel> ._)) .Returns(NewCandidateNumber); registrationService = new RegistrationService( registrationDataService, passwordDataService, passwordResetService, emailService, centresDataService, config, supervisorDelegateService, frameworkNotificationService, userDataService, new NullLogger <RegistrationService>() ); }
public void Setup() { centresDataService = A.Fake <ICentresDataService>(); certificateService = new CertificateService(centresDataService); }
public CentresService(ICentresDataService centresDataService, IClockService clockService) { this.centresDataService = centresDataService; this.clockService = clockService; }
public CentreContactInfoViewComponent(ICentresDataService centresDataService) { this.centresDataService = centresDataService; }
public CertificateService(ICentresDataService centresDataService) { this.centresDataService = centresDataService; }