public void Render_UsesHtmlEncoding() { var titleTag = new TitleTag("My <Title>"); titleTag.Render(_htmlHelper.Writer); var documentText = _htmlHelper.GetDocumentText(); Assert.That(documentText, Is.StringContaining("My <Title>")); }
public void Render() { var titleTag = new TitleTag("My Title"); titleTag.Render(_htmlHelper.Writer); var document = _htmlHelper.GetResultDocument(); var titleElement = _htmlHelper.GetAssertedChildElement(document, "title", 0); _htmlHelper.AssertTextNode(titleElement, "My Title", 0); }