Example #1
0
        public void BuildsLinkWithHrefAndTypeAndRel()
        {
            var link = new LinkElem {Href = "test.css", Type = LinkType.Css, Rel = LinkRelType.Stylesheet};

            var html = link.Html;

            var expected = "<link href=\"test.css\" type=\"text/css\" rel=\"stylesheet\">";

            Assert.AreEqual(expected, html);
        }
Example #2
0
        public void BuildsLinkWithHrefAndRel()
        {
            var link = new LinkElem {Href = "https://cdn.net/test/test.css", Rel = LinkRelType.Stylesheet};

            var html = link.Html;

            var expected = "<link href=\"https://cdn.net/test/test.css\" rel=\"stylesheet\">";

            Assert.AreEqual(expected, html);
        }
Example #3
0
        public void BuildsLinkWithHref()
        {
            var link = new LinkElem {Href = "../css/test.css"};

            var html = link.Html;

            var expected = "<link href=\"../css/test.css\">";

            Assert.AreEqual(expected, html);
        }
Example #4
0
        public void BuildsLinkWithHrefAndCssType()
        {
            var link = new LinkElem {Href = "http://localhost/test.css", Type = LinkType.Css};

            var html = link.Html;

            var expected = "<link href=\"http://localhost/test.css\" type=\"text/css\">";

            Assert.AreEqual(expected, html);
        }
Example #5
0
        public void BuildsEmptyLink()
        {
            var link = new LinkElem();

            var html = link.Html;

            var expected = "<link>";

            Assert.AreEqual(expected, html);
        }