public void RefreshConfiguration() { string sectionName = "TestSection"; DummySection configSection = new DummySection(); configSection.Value = 20; SqlConfigurationSystem configSystem = new SqlConfigurationSystem(data); configSystem.SaveSection(sectionName, configSection); DateTime lastModDate1 = GetLastModDate(sectionName); System.Threading.Thread.Sleep(1000); configSystem.RefreshConfig(sectionName); DateTime lastModDate2 = GetLastModDate(sectionName); Assert.IsFalse(lastModDate2.Equals(lastModDate1)); }
public void SaveAndGetTestConfiguration() { DummySection configSection = new DummySection(); configSection.Value = 20; SqlConfigurationSystem configSystem = new SqlConfigurationSystem(data); configSystem.SaveSection("TestSection", configSection); DummySection configSection2 = configSystem.GetSection("TestSection") as DummySection; Assert.AreEqual(configSection2.Value, configSection.Value); }
public void SaveTestConfiguration() { DummySection configSection = new DummySection(); configSection.Value = 20; SqlConfigurationSystem configSystem = new SqlConfigurationSystem(data); configSystem.SaveSection("TestSection",configSection); //Assert that the database now has one record Assert.IsTrue(GetNumberofConfigSections() == 1); }