public void CanBundleJavaScriptWithRemote() { var tag = javaScriptBundle .AddRemote("~/js/test.js", "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js") .Add("~/js/test.js") .Render("~/js/output_1_2.js"); Assert.AreEqual("<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js\"></script><script type=\"text/javascript\" src=\"js/output_1_2.js?r=E36D384488ABCF73BCCE650C627FB74F\"></script>", tag); Assert.AreEqual("function product(a,b){return a*b}function sum(a,b){return a+b}", fileWriterFactory.Files[TestUtilities.PreparePathRelativeToWorkingDirectory(@"C:\js\output_1_2.js")]); }
public void CanBundleJavaScriptWithRemote() { var tag = javaScriptBundle .AddRemote("~/js/test.js", "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js") .Add("~/js/test.js") .Render("~/js/output_1_2.js"); Assert.AreEqual("<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js\"></script><script type=\"text/javascript\" src=\"js/output_1_2.js?r=36286D0CEA57C5ED24B868EB0D2898E9\"></script>", tag); Assert.AreEqual("function product(n,t){return n*t}function sum(n,t){return n+t}", fileWriterFactory.Files[TestUtilities.PrepareRelativePath(@"js\output_1_2.js")]); }
public void CanBundleJavaScriptWithRemote() { var tag = javaScriptBundle .AddRemote(Test1Path, "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js") .Add(Test1Path) .Render(currentOutputFile); Assert.AreEqual("<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js\"></script>" + GetResolvedTag(currentOutputFile + "?r=E36D384488ABCF73BCCE650C627FB74F"), tag); //Assert.AreEqual(TEST1_MINIFIED, currentFileReader.ReadToEnd()); }