public void GravatarProfileLink_RendersLinkWithNoAttributes() { var email = "*****@*****.**"; var href = new GravatarProfile().GetUrl(email); var expected = "<a href=\"" + href + "\">linktext</a>"; var actual = GravatarHtml.GravatarProfileLink(null, email, "linktext"); Assert.AreEqual(expected.ToString(), actual.ToString()); }
public void GravatarProfileLink_RendersLinkWithAttributes() { var email = "*****@*****.**"; var href = new GravatarProfile().GetUrl(email); var attr = new { rel = "grofile", @class = "myclass" }; var expected = "<a rel=\"grofile\" class=\"myclass\" href=\"" + href + "\">linktext</a>"; var actual = GravatarHtml.GravatarProfileLink(null, email, "linktext", false, attr); Assert.AreEqual(expected.ToString(), actual.ToString()); }
public void GravatarProfileLink_RendersLink() { var email = "*****@*****.**"; var linkText = "linktext"; var href = new GravatarProfile().GetUrl(email); var attr = new Dictionary <string, object> { { "rel", "grofile" } }; var expected = "<a rel=\"grofile\" href=\"" + href + "\">linktext</a>"; var actual = GravatarHtml.GravatarProfileLink(null, email, linkText, false, attr); Assert.AreEqual(expected.ToString(), actual.ToString()); }