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