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