public Staff(IClassroomViewProvider classroomViewProvider, ICodeIdProvider codeIdProvider, ILocalEducationAgencyContextProvider localEducationAgencyContextProvider, IImageLinkProvider imageLinkProvider) { _classroomViewProvider = classroomViewProvider; _codeIdProvider = codeIdProvider; _localEducationAgencyContextProvider = localEducationAgencyContextProvider; this.imageLinkProvider = imageLinkProvider; }
public SecureLdapAuthenticationProvider(IConfigSectionProvider configSectionProvider, ILocalEducationAgencyContextProvider localEducationAgencyContextProvider, IRepository<LocalEducationAgency> localEducationAgencyRepository, IRepository<LocalEducationAgencyAuthentication> localEducationAgencyAuthenticationRepository) { this.configSectionProvider = configSectionProvider; this.localEducationAgencyContextProvider = localEducationAgencyContextProvider; _localEducationAgencyRepository = localEducationAgencyRepository; _localEducationAgencyAuthenticationRepository = localEducationAgencyAuthenticationRepository; }
protected override void EstablishContext() { LeaContextProvider = mocks.StrictMock<ILocalEducationAgencyContextProvider>(); LocalEducationAgencyApplicationRepository = mocks.StrictMock<IRepository<EdFi.Dashboards.Application.Data.Entities.LocalEducationAgency>>(); LocalEducationAgencyApplicationAuthRepository = mocks.StrictMock<IRepository<Dashboards.Application.Data.Entities.LocalEducationAgencyAuthentication>>(); Expect.Call(LeaContextProvider.GetCurrentLocalEducationAgencyCode()).Repeat.Any().Return("1"); Expect.Call(LocalEducationAgencyApplicationRepository.GetAll()).Repeat.Any().Return(new List<Dashboards.Application.Data.Entities.LocalEducationAgency> { new Dashboards.Application.Data.Entities.LocalEducationAgency { LocalEducationAgencyId = 1, Name = "Test", Code = "1" } }.AsQueryable()); Expect.Call(LocalEducationAgencyApplicationAuthRepository.GetAll()).Repeat.Any().Return(new List<Dashboards.Application.Data.Entities.LocalEducationAgencyAuthentication> { new LocalEducationAgencyAuthentication { LocalEducationAgencyId = 1, StaffInformationLookupKey = ExpectedValue, LdapLookupKey = string.Empty } }.AsQueryable()); base.EstablishContext(); }
public FileSystemBasedImagePathProvider( IConfigValueProvider configValueProvider, ILocalEducationAgencyContextProvider localEducationAgencyContextProvider) { this.configValueProvider = configValueProvider; this.localEducationAgencyContextProvider = localEducationAgencyContextProvider; }
protected override void EstablishContext() { schoolMetricInstanceTeacherListRepository = mocks.StrictMock<IRepository<SchoolMetricInstanceTeacherList>>(); staffInformationRepository = mocks.StrictMock<IRepository<StaffInformation>>(); staffEdOrgRepository = mocks.StrictMock<IRepository<StaffEducationOrgInformation>>(); uniqueListProvider = mocks.StrictMock<IUniqueListIdProvider>(); metricNodeResolver = mocks.StrictMock<IMetricNodeResolver>(); staffLinks = mocks.StrictMock<IStaffAreaLinks>(); codeIdProvider = mocks.StrictMock<ICodeIdProvider>(); localEducationAgencyContextProvider = mocks.StrictMock<ILocalEducationAgencyContextProvider>(); warehouseAvailabilityProvider = mocks.StrictMock<IWarehouseAvailabilityProvider>(); maxPriorYearProvider = mocks.StrictMock<IMaxPriorYearProvider>(); Expect.Call(warehouseAvailabilityProvider.Get()).Return(suppliedWarehouseAvailability); if (suppliedWarehouseAvailability) { Expect.Call(metricNodeResolver.GetMetricNodeForSchoolFromMetricVariantId(-1, -1)).IgnoreArguments().Return(GetMetricMetadataNode()); Expect.Call(localEducationAgencyContextProvider.GetCurrentLocalEducationAgencyCode()).Return("Code"); Expect.Call(codeIdProvider.Get("Code")).Return(1); Expect.Call(maxPriorYearProvider.Get(1)).Return(2012); Expect.Call(schoolMetricInstanceTeacherListRepository.GetAll()).Return(GetSuppliedSchoolMetricInstanceTeacherList()); Expect.Call(uniqueListProvider.GetUniqueId(suppliedMetricVariantId)).Return(suppliedUniqueId); if (isStaffCountGreaterThanZero) { Expect.Call(staffEdOrgRepository.GetAll()).Return(GetSuppliedStaffEdOrg()); Expect.Call(staffInformationRepository.GetAll()).Return(GetStaffInformation()); Expect.Call(staffLinks.Default(-1, -1, string.Empty, null, null, null)).IgnoreArguments().Return(string.Empty); } } base.EstablishContext(); }
public StaffInformationLookupKeyProvider(ILocalEducationAgencyContextProvider localEducationAgencyContextProvider, IRepository<Dashboards.Application.Data.Entities.LocalEducationAgency> localEducationAgencyRepository, IRepository<LocalEducationAgencyAuthentication> localEducationAgencyAuthenticationRepository) { _leaContextProvider = localEducationAgencyContextProvider; _localEducationAgencyRepository = localEducationAgencyRepository; _localEducationAgencyAuthenticationRepository = localEducationAgencyAuthenticationRepository; }
public DashboardContextLeaCodeProvider(IIdCodeService idCodeService, IHttpRequestProvider httpRequestProvider, ILocalEducationAgencyContextProvider next) : base(idCodeService, httpRequestProvider, next) { }
protected override void ExecuteTest() { localEducationAgencyContextProvider = IoC.Resolve<ILocalEducationAgencyContextProvider>(); }
public HttpRequestUrlLeaCodeProvider(IIdCodeService idCodeService, IHttpRequestProvider httpRequestProvider, ILocalEducationAgencyContextProvider next, IRequestUrlBaseProvider requestUrlBaseProvider) : base(idCodeService, httpRequestProvider, next) { this.requestUrlBaseProvider = requestUrlBaseProvider; }
/// <summary> /// Initializes a new instance of the <see cref="LocalEducationAgencyContextConnectionStringSelector"/> class using the local education context provider. /// </summary> /// <param name="localEducationAgencyContextProvider">The provider that identifies the local education agency that is in context for the current request.</param> public LocalEducationAgencyContextConnectionStringSelector(ILocalEducationAgencyContextProvider localEducationAgencyContextProvider) { this.localEducationAgencyContextProvider = localEducationAgencyContextProvider; }
public HttpContextItemsLeaCodeProvider(IIdCodeService idCodeService, IHttpRequestProvider httpRequestProvider, IHttpContextItemsProvider httpContextItemsProvider, ILocalEducationAgencyContextProvider next) : base(idCodeService, httpRequestProvider, next) { this.httpContextItemsProvider = httpContextItemsProvider; }