Exemple #1
0
        public void BeginOffsetSpecialHandling()
        {
            string input  = @"<Root><BeginOffset val='3'/><Child>More text</Child></Root>";
            var    root   = GetNode(input);
            string result = new FwGenericHtmlGenerator().MakeHtml(root);

            XmlTestHelper.AssertXPathIsNull(result, @"//div[text()[contains(., 'BeginOffset')]]");
        }
Exemple #2
0
        public void ValAttrSpecialHandling()
        {
            string input  = @"<Root><HomographNumber val='3'/><Child>More text</Child></Root>";
            var    root   = GetNode(input);
            string result = new FwGenericHtmlGenerator().MakeHtml(root);

            XmlTestHelper.AssertXPathMatchesExactlyOne(result, @"div[@class='property']/div[@class='property' and text()='HomographNumber: 3']");
        }
Exemple #3
0
        public void StrSpecialHandling()
        {
            string input  = @"<Root><Child><Str><Run ws='en'>SomeText</Run></Str></Child><Child>More text</Child></Root>";
            var    root   = GetNode(input);
            string result = new FwGenericHtmlGenerator().MakeHtml(root);

            XmlTestHelper.AssertXPathMatchesExactlyOne(result, @"div[@class='property']/div[@class='property' and text()='Child: SomeText']");
            XmlTestHelper.AssertXPathMatchesExactlyOne(result, @"div[text()='Root: ']");
        }
Exemple #4
0
        public void DefaultShowsHierarchicalContent()
        {
            string input  = @"<Root><Child>SomeText</Child><Child>More text</Child></Root>";
            var    root   = GetNode(input);
            string result = new FwGenericHtmlGenerator().MakeHtml(root);

            XmlTestHelper.AssertXPathMatchesExactlyOne(result, @"div[@class='property']/div[@class='property' and text()='Child: SomeText']");
            XmlTestHelper.AssertXPathMatchesExactlyOne(result, @"div/div[text()='Child: More text']");
            XmlTestHelper.AssertXPathMatchesExactlyOne(result, @"div[text()='Root: ']");
        }
Exemple #5
0
        public void AUniSpecialHandling()
        {
            string input  = @"<Root><Child><AUni ws='en'>SomeText</AUni></Child><Child>More text</Child></Root>";
            var    root   = GetNode(input);
            string result = new FwGenericHtmlGenerator().MakeHtml(root);

            XmlTestHelper.AssertXPathMatchesExactlyOne(result, @"div[@class='property']/div[@class='property' and text()='Child: ']/div[@class='ws']/span[@class='ws' and text()='en']");
            XmlTestHelper.AssertXPathMatchesExactlyOne(result, @"div[@class='property']/div[@class='property' and text()='Child: ']/div[@class='ws' and contains(text(),': SomeText')]");
            XmlTestHelper.AssertXPathMatchesExactlyOne(result, @"div/div[text()='Child: More text']");
            XmlTestHelper.AssertXPathMatchesExactlyOne(result, @"div[text()='Root: ']");
        }