protected override void ExecuteTest()
 {
     var adminService = new ConfigurationService(administrationRepository, localEducationAgencyInformationRepository, adminAreaLinks, new HashtableCacheProvider(), siteAvailableProvider, systemMessageProvider);
     actualModel = adminService.Get(new ConfigurationRequest() { LocalEducationAgencyId = suppliedLocalEducationAgencyId });
 }
        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();
        }
        protected override void EstablishContext()
        {
            suppliedLocalEducationAgencyInformation = GetSuppliedLocalEducationAgencyInformation();
            localEducationAgencyInformationRepository = mocks.StrictMock<IRepository<LocalEducationAgencyInformation>>();
            Expect.Call(localEducationAgencyInformationRepository.GetAll()).Repeat.Any().Return(suppliedLocalEducationAgencyInformation);

            suppliedModel = new ConfigurationModel { LocalEducationAgencyId = suppliedLocalEducationAgencyId, IsKillSwitchActivated = true, SystemMessage = providedSystemMessage };

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

            base.EstablishContext();
        }
Пример #4
0
 public ViewResult Get(ConfigurationModel setModel)
 {
     service.Post(setModel);
     return Get(setModel.LocalEducationAgencyId);
 }