public SupervisorController(
     ISupervisorService supervisorService,
     ICommonService commonService,
     IFrameworkNotificationService frameworkNotificationService,
     ISelfAssessmentService selfAssessmentService,
     IFrameworkService frameworkService,
     IConfigDataService configDataService,
     ICentreRegistrationPromptsService centreRegistrationPromptsService,
     IUserDataService userDataService,
     ILogger <SupervisorController> logger,
     IConfiguration config,
     ISearchSortFilterPaginateService searchSortFilterPaginateService,
     IMultiPageFormService multiPageFormService,
     IRegistrationService registrationService
     )
 {
     this.supervisorService                = supervisorService;
     this.commonService                    = commonService;
     this.frameworkNotificationService     = frameworkNotificationService;
     this.selfAssessmentService            = selfAssessmentService;
     this.frameworkService                 = frameworkService;
     this.configDataService                = configDataService;
     this.centreRegistrationPromptsService = centreRegistrationPromptsService;
     this.userDataService                  = userDataService;
     this.logger = logger;
     this.config = config;
     this.searchSortFilterPaginateService = searchSortFilterPaginateService;
     this.multiPageFormService            = multiPageFormService;
     this.registrationService             = registrationService;
 }
 public LearningPortalController(
     ICentresDataService centresDataService,
     ICourseDataService courseDataService,
     ISelfAssessmentService selfAssessmentService,
     ISupervisorService supervisorService,
     IFrameworkService frameworkService,
     INotificationService notificationService,
     IFrameworkNotificationService frameworkNotificationService,
     ILogger <LearningPortalController> logger,
     IConfiguration config,
     IActionPlanService actionPlanService,
     ICandidateAssessmentDownloadFileService candidateAssessmentDownloadFileService,
     ISearchSortFilterPaginateService searchSortFilterPaginateService,
     IMultiPageFormService multiPageFormService
     )
 {
     this.centresDataService           = centresDataService;
     this.courseDataService            = courseDataService;
     this.selfAssessmentService        = selfAssessmentService;
     this.supervisorService            = supervisorService;
     this.frameworkService             = frameworkService;
     this.notificationService          = notificationService;
     this.frameworkNotificationService = frameworkNotificationService;
     this.logger            = logger;
     this.config            = config;
     this.actionPlanService = actionPlanService;
     this.candidateAssessmentDownloadFileService = candidateAssessmentDownloadFileService;
     this.searchSortFilterPaginateService        = searchSortFilterPaginateService;
     this.multiPageFormService = multiPageFormService;
 }
示例#3
0
        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();
        }
示例#4
0
 public RoleProfilesController(
     IRoleProfileService roleProfileService,
     ICommonService commonService,
     IFrameworkNotificationService frameworkNotificationService,
     IConfigService configService,
     ILogger <RoleProfilesController> logger,
     IConfiguration config)
 {
     this.roleProfileService           = roleProfileService;
     this.commonService                = commonService;
     this.frameworkNotificationService = frameworkNotificationService;
     this.configService                = configService;
     this.logger = logger;
     this.config = config;
 }
示例#5
0
 public FrameworksController(
     IFrameworkService frameworkService,
     ICommonService commonService,
     IFrameworkNotificationService frameworkNotificationService,
     ILogger <FrameworksController> logger,
     IImportCompetenciesFromFileService importCompetenciesFromFileService,
     ICompetencyLearningResourcesDataService competencyLearningResourcesDataService
     )
 {
     this.frameworkService             = frameworkService;
     this.commonService                = commonService;
     this.frameworkNotificationService = frameworkNotificationService;
     this.logger = logger;
     this.importCompetenciesFromFileService      = importCompetenciesFromFileService;
     this.competencyLearningResourcesDataService = competencyLearningResourcesDataService;
 }
示例#6
0
        public void SetUp()
        {
            frameworkService             = A.Fake <IFrameworkService>();
            frameworkNotificationService = A.Fake <IFrameworkNotificationService>();
            commonService = A.Fake <ICommonService>();
            var logger = A.Fake <ILogger <FrameworksController> >();

            config = A.Fake <IConfiguration>();
            importCompetenciesFromFileService      = A.Fake <IImportCompetenciesFromFileService>();
            competencyLearningResourcesDataService = A.Fake <ICompetencyLearningResourcesDataService>();
            learningHubApiClient            = A.Fake <ILearningHubApiClient>();
            searchSortFilterPaginateService = A.Fake <ISearchSortFilterPaginateService>();
            multiPageFormService            = A.Fake <IMultiPageFormService>();

            A.CallTo(() => config["CurrentSystemBaseUrl"]).Returns(BaseUrl);

            var user = new ClaimsPrincipal(
                new ClaimsIdentity(
                    new[]
            {
                new Claim("UserAdminId", AdminId.ToString()),
                new Claim("UserCentreID", CentreId.ToString()),
                new Claim("IsFrameworkDeveloper", "True"),
            },
                    "mock"
                    )
                );

            controller = new FrameworksController(
                frameworkService,
                commonService,
                frameworkNotificationService,
                logger,
                importCompetenciesFromFileService,
                competencyLearningResourcesDataService,
                learningHubApiClient,
                searchSortFilterPaginateService,
                multiPageFormService
                )
            {
                ControllerContext = new ControllerContext {
                    HttpContext = new DefaultHttpContext {
                        User = user
                    }
                },
            };
        }
示例#7
0
 public SupervisorController(
     ISupervisorService supervisorService,
     ICommonService commonService,
     IFrameworkNotificationService frameworkNotificationService,
     ISelfAssessmentService selfAssessmentService,
     IConfigService configService,
     ICentreCustomPromptsService centreCustomPromptsService,
     ILogger <SupervisorController> logger,
     IConfiguration config)
 {
     this.supervisorService            = supervisorService;
     this.commonService                = commonService;
     this.frameworkNotificationService = frameworkNotificationService;
     this.selfAssessmentService        = selfAssessmentService;
     this.configService                = configService;
     this.centreCustomPromptsService   = centreCustomPromptsService;
     this.logger = logger;
     this.config = config;
 }
 public FrameworksController(
     IFrameworkService frameworkService,
     ICommonService commonService,
     IFrameworkNotificationService frameworkNotificationService,
     ILogger <FrameworksController> logger,
     IImportCompetenciesFromFileService importCompetenciesFromFileService,
     ICompetencyLearningResourcesDataService competencyLearningResourcesDataService,
     ILearningHubApiClient learningHubApiClient,
     ISearchSortFilterPaginateService searchSortFilterPaginateService,
     IMultiPageFormService multiPageFormService
     )
 {
     this.frameworkService             = frameworkService;
     this.commonService                = commonService;
     this.frameworkNotificationService = frameworkNotificationService;
     this.logger = logger;
     this.importCompetenciesFromFileService      = importCompetenciesFromFileService;
     this.competencyLearningResourcesDataService = competencyLearningResourcesDataService;
     this.learningHubApiClient            = learningHubApiClient;
     this.searchSortFilterPaginateService = searchSortFilterPaginateService;
     this.multiPageFormService            = multiPageFormService;
 }
示例#9
0
 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;
 }
示例#10
0
        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>()
                );
        }