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); }
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); }
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); }
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); }
public void BuildsEmptyLink() { var link = new LinkElem(); var html = link.Html; var expected = "<link>"; Assert.AreEqual(expected, html); }