public void Then_CompositeReturnsNewSection() { var section = (DummySection)CompositeSource.GetSection(FileSourceDummySectionName); Assert.AreEqual("new name", section.Name); Assert.AreEqual(24, section.Value); }
protected override void Act() { section = CompositeSource.GetSection(FileSourceDummySectionName) as DummySection; File.SetLastWriteTime(@"ExternalFileSource.config", DateTime.Now.AddSeconds(1.0)); // Wait for at least two events Assert.IsTrue(waitForChangedEvents.Wait(30000), "timed out"); }
protected override void Act() { var section = (DummySection)CompositeSource.GetSection(FileSourceDummySectionName); CompositeSource.Remove(FileSourceDummySectionName); CompositeSource.Add(FileSourceDummySectionName, new DummySection { Value = 24, Name = "new name" }); }
protected override void Act() { section = CompositeSource.GetSection(FileSourceDummySectionName) as DummySection; File.SetLastWriteTime(@"ExternalFileSource.config", DateTime.Now); // Wait for at least two events Assert.IsTrue(waitForChangedEvents.Wait(30000), "timed out"); // And give it a little more time in case more come in Thread.Sleep(3000); }
protected override void Act() { section = (DummySection)CompositeSource.GetSection(FileSourceDummySectionName); }
public void Then_GetSectionThrows_ConfigurationErrorsException() { CompositeSource.GetSection(NonExistingSourceDummy); }
public void Then_MethodReturnsConfiguationSection() { DummySection section = (DummySection)CompositeSource.GetSection(PointsToSelfSourceDummySectionName); Assert.IsNotNull(section); }