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; }
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(); }