예제 #1
0
        public void OverLayNullWithSimple()
        {
            var stfConfiguration = new StfConfiguration();
            var conf2            = stfConfiguration.LoadConfig(@"TestData\ConfigOverlay\Config2.xml");
            var overLay          = stfConfiguration.OverLay(null, conf2);

            DumpTree(overLay, @"overLay.xml");
            DumpTree(conf2, @"expected.xml");

            Assert.IsTrue(conf2.Identical(conf2, overLay));
        }
예제 #2
0
        public void OverLayConfigConfigOneSectionWithinOneSectionWithinOneSection()
        {
            var stfConfiguration = new StfConfiguration();
            var conf1            = stfConfiguration.LoadConfig(@"TestData\ConfigOverlay\ConfigOneSectionWithinOneSectionWithinOneSection.xml");
            var conf2            = stfConfiguration.LoadConfig(@"TestData\ConfigOverlay\ConfigOneSectionWithinOneSectionWithinOneSection.xml");
            var overLay          = stfConfiguration.OverLay(conf1, conf2);

            DumpTree(overLay, @"overLay.xml");
            DumpTree(conf2, @"expected.xml");

            Assert.IsTrue(conf2.Identical(conf2, overLay));
        }
예제 #3
0
        public void OverLay23()
        {
            var stfConfiguration = new StfConfiguration();
            var conf2            = stfConfiguration.LoadConfig(@"TestData\ConfigOverlay\Config2.xml");
            var conf3            = stfConfiguration.LoadConfig(@"TestData\ConfigOverlay\Config3.xml");
            var conf23           = stfConfiguration.LoadConfig(@"TestData\ConfigOverlay\Config23.xml");
            var overLay          = stfConfiguration.OverLay(conf2, conf3);

            DumpTree(overLay, @"overLay.xml");
            DumpTree(conf23, @"expected.xml");

            Assert.IsTrue(conf2.Identical(conf23, overLay));
        }
예제 #4
0
        public void OverLayConfigWithDuplicatedSection()
        {
            var stfConfiguration = new StfConfiguration();
            var conf1            = stfConfiguration.LoadConfig(@"TestData\ConfigOverlay\ConfigWithDuplicatedSection.xml");
            var conf2            = stfConfiguration.LoadConfig(@"TestData\ConfigOverlay\ConfigWithDuplicatedSectionOverlay.xml");
            var overLay          = stfConfiguration.OverLay(conf1, conf2);
            var confExpected     = stfConfiguration.LoadConfig(@"TestData\ConfigOverlay\ConfigWithDuplicatedSectionExpected.xml");

            DumpTree(overLay, @"overLay.xml");
            DumpTree(confExpected, @"confExpected.xml");

            StfAssert.IsTrue("Comparing", confExpected.Identical(confExpected, overLay));
        }