public void SelfClosing() { var builder = new HTMLBuilder(HTMLDocumentType.HTML5); builder.Settings.EnforceProperNesting = true; builder.Empty(); builder.AddElement("br", ""); Assert.AreEqual(ConvertResourceStringToCurrentEnvironment(Test.Resources.AssertSelfClosing), builder.ToString()); }
public void NoSelfClosing() { var builder = new HTMLBuilder(); builder.Settings.EnforceProperNesting = false; builder.Empty(); builder.AddElement("script", new[] { new HTMLAttribute("src", "test.js") }, ""); Assert.AreEqual(ConvertResourceStringToCurrentEnvironment(Test.Resources.AssertNoSelfClosing), builder.ToString()); }