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"); }
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"); }