Ejemplo n.º 1
0
        protected override void EstablishContext()
        {
            suppliedAdministration = GetSuppliedAdministration();

            administrationRepository = mocks.StrictMock<IPersistingRepository<LocalEducationAgencyAdministration>>();
            Expect.Call(administrationRepository.GetAll()).Return(suppliedAdministration);

            suppliedLocalEducationAgencyInformation = GetSuppliedLocalEducationAgencyInformation();
            localEducationAgencyInformationRepository = mocks.StrictMock<IRepository<LocalEducationAgencyInformation>>();
            Expect.Call(localEducationAgencyInformationRepository.GetAll()).Return(suppliedLocalEducationAgencyInformation);

            systemMessageProvider = mocks.StrictMock<ISystemMessageProvider>();
            siteAvailableProvider = mocks.StrictMock<ISiteAvailableProvider>();

            base.EstablishContext();
        }
 public LocalEducationAgencySearchProvider(ICacheProvider cacheProvider, IPersistingRepository<LocalEducationAgencySearch> searchRepository)
 {
     this.cacheProvider = cacheProvider;
     this.searchRepository = searchRepository;
 }
Ejemplo n.º 3
0
        protected override void EstablishContext()
        {
            suppliedAdministration = GetSuppliedAdministration();
            suppliedLocalEducationAgencyInformation = GetSuppliedLocalEducationAgencyInformation();
            localEducationAgencyInformationRepository = mocks.StrictMock<IRepository<LocalEducationAgencyInformation>>();
            Expect.Call(localEducationAgencyInformationRepository.GetAll()).Return(suppliedLocalEducationAgencyInformation);

            suppliedModel = new ConfigurationModel {LocalEducationAgencyId = suppliedLocalEducationAgencyId, IsKillSwitchActivated = true, SystemMessage = providedSystemMessage};
            administrationRepository = mocks.StrictMock<IPersistingRepository<LocalEducationAgencyAdministration>>();
            Expect.Call(administrationRepository.GetAll()).Return(suppliedAdministration);
            Expect.Call(delegate { administrationRepository.Save(Arg<LocalEducationAgencyAdministration>.Matches(x => x.LocalEducationAgencyId == suppliedLocalEducationAgencyId && x.IsKillSwitchActivated.GetValueOrDefault() && x.SystemMessage == providedSystemMessage)); });

            systemMessageProvider = mocks.StrictMock<ISystemMessageProvider>();
            siteAvailableProvider = mocks.StrictMock<ISiteAvailableProvider>();

            base.EstablishContext();
        }