public void CssWorks() { string expected = "<link href=\"//css.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n"; var item = new WebDependency("test"); item.Add(new WebDependencyFile("//css.css", WebDependencyFileType.Css)); var result = new WebDependencies().Render(item); SrkToolkit.Testing.Assert.AreEqual(expected, result.ToString()); }
public void JsWorks() { string expected = "<script src=\"//js.js\" type=\"text/javascript\"></script>\r\n"; var item = new WebDependency("test"); item.Add(new WebDependencyFile("//js.js", WebDependencyFileType.Javascript)); var result = new WebDependencies().Render(item); SrkToolkit.Testing.Assert.AreEqual(expected, result.ToString()); }
public void JsWithAttributesWorks() { string expected = "<script data-main=\"Scripts/main\" src=\"//js.js\" type=\"text/javascript\"></script>\r\n"; var item = new WebDependency("test"); var attributes = new Dictionary <string, object>() { { "data-main", "Scripts/main" }, }; item.Add(new WebDependencyFile("//js.js", WebDependencyFileType.Javascript, attributes: attributes)); var result = new WebDependencies().Render(item); SrkToolkit.Testing.Assert.AreEqual(expected, result.ToString()); }