Exemplo n.º 1
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;
 }
Exemplo n.º 2
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
                    }
                },
            };
        }
 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;
 }