예제 #1
0
        public void Setup()
        {
            var connection = ServiceTestHelper.GetDatabaseConnection();

            service = new CompetencyLearningResourcesDataService(connection);

            testHelper = new CompetencyLearningResourcesTestHelper(connection);
        }
예제 #2
0
 public RecommendedLearningService(
     ISelfAssessmentDataService selfAssessmentDataService,
     ICompetencyLearningResourcesDataService competencyLearningResourcesDataService,
     ILearningHubApiClient learningHubApiClient,
     ILearningLogItemsDataService learningLogItemsDataService
     )
 {
     this.selfAssessmentDataService = selfAssessmentDataService;
     this.competencyLearningResourcesDataService = competencyLearningResourcesDataService;
     this.learningHubApiClient        = learningHubApiClient;
     this.learningLogItemsDataService = learningLogItemsDataService;
 }
예제 #3
0
        public void Setup()
        {
            competencyLearningResourcesDataService = A.Fake <ICompetencyLearningResourcesDataService>();
            learningLogItemsDataService            = A.Fake <ILearningLogItemsDataService>();
            learningHubApiClient      = A.Fake <ILearningHubApiClient>();
            selfAssessmentDataService = A.Fake <ISelfAssessmentDataService>();

            recommendedLearningService = new RecommendedLearningService(
                selfAssessmentDataService,
                competencyLearningResourcesDataService,
                learningHubApiClient,
                learningLogItemsDataService
                );
        }
예제 #4
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;
 }
예제 #5
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
                    }
                },
            };
        }
예제 #6
0
 public ActionPlanService(
     ICompetencyLearningResourcesDataService competencyLearningResourcesDataService,
     ILearningLogItemsDataService learningLogItemsDataService,
     IClockService clockService,
     ILearningHubApiClient learningHubApiClient,
     ISelfAssessmentDataService selfAssessmentDataService,
     IConfiguration config,
     ILearningResourceReferenceDataService learningResourceReferenceDataService
     )
 {
     this.competencyLearningResourcesDataService = competencyLearningResourcesDataService;
     this.learningLogItemsDataService            = learningLogItemsDataService;
     this.clockService              = clockService;
     this.learningHubApiClient      = learningHubApiClient;
     this.selfAssessmentDataService = selfAssessmentDataService;
     this.config = config;
     this.learningResourceReferenceDataService = learningResourceReferenceDataService;
 }
예제 #7
0
        public void Setup()
        {
            genericCatalogue = Builder <Catalogue> .CreateNew().With(c => c.Name = "Generic catalogue").Build();

            clockService = A.Fake <IClockService>();
            competencyLearningResourcesDataService = A.Fake <ICompetencyLearningResourcesDataService>();
            learningLogItemsDataService            = A.Fake <ILearningLogItemsDataService>();
            learningHubResourceService             = A.Fake <ILearningHubResourceService>();
            selfAssessmentDataService            = A.Fake <ISelfAssessmentDataService>();
            learningResourceReferenceDataService = A.Fake <ILearningResourceReferenceDataService>();
            config = A.Fake <IConfiguration>();

            actionPlanService = new ActionPlanService(
                competencyLearningResourcesDataService,
                learningLogItemsDataService,
                clockService,
                learningHubResourceService,
                selfAssessmentDataService,
                config,
                learningResourceReferenceDataService
                );
        }
 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;
 }