public void ThumbnailImage() { var image = new Image("http://placehold.it/350x150", "Placeholder", Image.Style.Thumbnail); Assert.AreEqual("<img alt=\"Placeholder\" class=\"img-thumbnail\" src=\"http://placehold.it/350x150\" />", image.ToHtmlString()); }
public static IHtmlString Image(this HtmlHelper html, string src, string alt, Image.Style style, bool responsive = false) { return new Image(src, alt, style, responsive); }
public void RoundedImage() { var image = new Image("http://placehold.it/350x150", "Placeholder", Image.Style.Rounded); Assert.AreEqual("<img alt=\"Placeholder\" class=\"img-rounded\" src=\"http://placehold.it/350x150\" />", image.ToHtmlString()); }