Esempio n. 1
0
        public void Initialize_DefaultConfiguration_RootHasCorrectSubNodes()
        {
            var builder = new TransformBuilder();

            builder.Initialize();
            var document = builder.Build();
            var rootNode = document.Root;

            Assert.NotNull(rootNode);
            Assert.Equal(3, rootNode.Elements().Count());
            Assert.Contains(rootNode.Elements(), e => e.Name.LocalName == "strip-space");
            Assert.Contains(rootNode.Elements(), e => e.Name.LocalName == "output");
            Assert.Contains(rootNode.Elements(), e => e.Name.LocalName == "template");
        }
Esempio n. 2
0
        public void Build_ConfigIgnoreWhitespaceIsFalse_RemovesStripSpaceCorrectly()
        {
            var config = new TransformBuilderConfiguration
            {
                IgnoreWhitespace = false
            };
            var builder  = new TransformBuilder(config);
            var document = builder.Build();

            builder.Initialize();
            var rootNode = document.Root;

            Assert.NotNull(rootNode);
            Assert.DoesNotContain(rootNode.Elements(), e => e.Name.LocalName == "strip-space");
        }