public void TestComplexTagRender() { ContainerTag complexTestTag = Html().With(Body().With(Header(), Main().With(P("Main stuff...")), Footer().CondWith(1 == 1, P("Conditional with!")))); string expectedResult = "<html><body><header></header><main><p>Main stuff...</p></main><footer><p>Conditional with!</p></footer></body></html>"; Assert.AreEqual(expectedResult, complexTestTag.Render()); }
public void TestTagRender() { ContainerTag testTag = new ContainerTag("a"); testTag.Attr("href", "http://example.com"); Assert.AreEqual("<a href=\"http://example.com\"></a>", testTag.Render()); }