16 references to ToHtmlString
Microsoft.AspNetCore.Components.Web.Tests (16)
HtmlRendering\HtmlRendererTest.cs (16)
63Assert.Equal("<p></p>", result.ToHtmlString());
816Assert.Empty(first.ToHtmlString());
829Assert.Empty(second.ToHtmlString());
830Assert.Equal("Hello from the section content provider", first.ToHtmlString());
875Assert.Equal("Loading...", result.ToHtmlString());
880Assert.Equal("Finished loading", result.ToHtmlString());
1008And now with HTML encoding: Person with special chars like ' " </script>".Replace("\r", ""), result.ToHtmlString());
1030Assert.Equal("<div></div>", result.ToHtmlString());
1053Assert.Equal("<form></form>", result.ToHtmlString());
1078Assert.Equal("<form><input type=\"hidden\" name=\"_handler\" value=\"some <name>\" /></form>", result.ToHtmlString());
1106Assert.Equal("<form><input type=\"hidden\" name=\"_handler\" value=\"[myscope]somename\" /></form>", result.ToHtmlString());
1137Assert.Equal($"<form action=\"{HttpUtility.HtmlAttributeEncode(expectedAction)}\"></form>", result.ToHtmlString());
1159Assert.Equal("<form method=\"post\" action=\"/page\"></form>", result.ToHtmlString());
1181Assert.Equal("<form action=\"https://example.com/explicit\"></form>", result.ToHtmlString());
1202Assert.Equal("<form></form>", result.ToHtmlString());
1213var actualHtml = actual.ToHtmlString();