public void Then_SectionEndsUpInAppropriateSource() { DummySection sectionFromSource1 = (DummySection)ChildSource1.GetSection(SectionInChildSource1); Assert.IsNotNull(sectionFromSource1); Assert.AreEqual("NewSection", sectionFromSource1.Name); }
protected override void Act() { DummySection dummySectionBeforeChange = (DummySection)MainSource.GetSection(SectionInChildSource1); ChildSource1.Remove(SectionInChildSource1); ChildSource1.Add(SectionInChildSource1, new DummySection { Name = "new name", Value = 16 }); ChildSource1.DoSourceChanged(new[] { SectionInChildSource1 }); }
public void Then_CompositeConfigurationSourceStillListensToSectionChangedOnSubordinateSource() { bool called = false; MainSource.AddSectionChangeHandler(SectionInChildSource1, (sender, args) => called = true); ChildSource1 = (TestConfigurationSource)CompositionHandler["Source1"]; ChildSource1.DoSourceSectionChanged(SectionInChildSource1); Assert.IsTrue(called); }
protected override void Act() { ChildSource1.DoSourceChanged(new [] { "section1" }); }