Example #1
0
        public void Render_UsesHtmlEncoding()
        {
            var titleTag = new TitleTag("My <Title>");

            titleTag.Render(_htmlHelper.Writer);

            var documentText = _htmlHelper.GetDocumentText();

            Assert.That(documentText, Is.StringContaining("My &lt;Title&gt;"));
        }
Example #2
0
        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);
        }