public void Extends_IFubuView_With_AlternateLink_Tag_With_Provided_AlternateLink_As_IEnumerable_With_Indentation() { var links = new[] { new {Href = "link1", Title = "Link one", Type = "application/atom+xml"}, new {Href = "link2", Title = "Link two", Type = "application/rss+xml"} }; new LinkExpression() .FromList(links, (x, l)=> l.AsAlternate().Href(x.Href).Type(x.Type).Title(x.Title)) .Indent(" ") .ToString() .ShouldEqual("<link rel=\"alternate\" type=\"application/atom+xml\" title=\"Link one\" href=\"/link1\"/>\r\n <link rel=\"alternate\" type=\"application/rss+xml\" title=\"Link two\" href=\"/link2\"/>"); }
public void Extends_IFubuView_With_ScriptLink_Tag_With_Provided_Href_As_IEnumerable_With_Indentation() { var links = new[] { "Script.Url.1", "Script.Url.2" }; new TestView().Script(links).Indent(" ").ToString().ShouldEqual("<script type=\"text/javascript\" src=\"/content/scripts/Script.Url.1\"></script>\r\n <script type=\"text/javascript\" src=\"/content/scripts/Script.Url.2\"></script>"); }