public void CanParseCloseTag() { "<p></p>".AssertParsesTo( Fragment.OpenTag("p", false), Fragment.CloseTag("p") ); }
public void IsClosedReturnsCloseTags() { var t = Fragment.CloseTag("a"); Assert.True(t.IsClose("a")); Assert.False(t.IsClose("b")); Assert.True(t.IsClose()); }
public void CanParseScriptTagWithHtml() { "<script type=\"text/javascript\">document.write('<p>Test</p>');</script>".AssertParsesTo( Fragment.OpenTag("script", false, HtmlAttribute.Create("type", "text/javascript")), Fragment.Text("document.write('<p>Test</p>');"), Fragment.CloseTag("script") ); }
public void CanParseInnerText() { "<p> Testing </p>".AssertParsesTo( Fragment.OpenTag("p", false), Fragment.Text(" Testing "), Fragment.CloseTag("p") ); }
public void CanParseInvalidDOM() { "<p>test <bold>tada</p>".AssertParsesTo( Fragment.OpenTag("p", false), Fragment.Text("test "), Fragment.OpenTag("bold", false), Fragment.Text("tada"), Fragment.CloseTag("p") ); }
public void CanParseInvalidHtml() { "<p>I <3 html!</p>".AssertParsesTo( Fragment.OpenTag("p", false), Fragment.Text("I "), Fragment.Text("<"), Fragment.Text("3 stuff!"), Fragment.CloseTag("p") ); }