示例#1
0
        public void Then_SectionEndsUpInAppropriateSource()
        {
            DummySection sectionFromSource1 = (DummySection)ChildSource1.GetSection(SectionInChildSource1);

            Assert.IsNotNull(sectionFromSource1);
            Assert.AreEqual("NewSection", sectionFromSource1.Name);
        }
示例#2
0
        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 });
        }
示例#3
0
        public void Then_CompositeConfigurationSourceStillListensToSectionChangedOnSubordinateSource()
        {
            bool called = false;

            MainSource.AddSectionChangeHandler(SectionInChildSource1, (sender, args) => called = true);


            ChildSource1 = (TestConfigurationSource)CompositionHandler["Source1"];
            ChildSource1.DoSourceSectionChanged(SectionInChildSource1);

            Assert.IsTrue(called);
        }
示例#4
0
 protected override void Act()
 {
     ChildSource1.DoSourceChanged(new [] { "section1" });
 }