public void CanBundleJavaScriptWithEmbeddedResource()
        {
            var tag = javaScriptBundle
                      .AddEmbeddedResource(Test1Path, "SquishIt.Tests://js.embedded.js")
                      .Render(currentOutputFile);

            Assert.AreEqual(GetResolvedTag(currentOutputFile + "?r=E36D384488ABCF73BCCE650C627FB74F"), tag);
        }
Beispiel #2
0
        public void CanBundleJavaScriptWithEmbeddedResource()
        {
            var tag = javaScriptBundle
                      .AddEmbeddedResource("~/js/test.js", "SquishIt.Tests://EmbeddedResource.Embedded.js")
                      .Render("~/js/output_Embedded.js");

            Assert.AreEqual("<script type=\"text/javascript\" src=\"js/output_Embedded.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_Embedded.js")]);
        }
        public void CanBundleJavaScriptWithEmbeddedResource()
        {
            var tag = javaScriptBundle
                      .AddEmbeddedResource("~/js/test.js", "SquishIt.Tests://EmbeddedResource.Embedded.js")
                      .Render("~/js/output_Embedded.js");

            Assert.AreEqual("<script type=\"text/javascript\" src=\"js/output_Embedded.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_Embedded.js")]);
        }
        public void CanDebugBundleJavaScriptWithEmbeddedResource()
        {
            var tag = debugJavaScriptBundle
                      .AddEmbeddedResource(EmbeddedResourcePath, "SquishIt.Tests://js.embedded.js")
                      .Render(currentOutputFile);

            Assert.AreEqual("<script type=\"text/javascript\" src=\"" + EmbeddedResourcePath + "\"></script>\n", tag);
        }
Beispiel #5
0
        public void CanDebugBundleJavaScriptWithEmbeddedResource()
        {
            var tag = debugJavaScriptBundle
                      .AddEmbeddedResource("~/js/test.js", "SquishIt.Tests://EmbeddedResource.Embedded.js")
                      .Render("~/js/output_Embedded.js");

            Assert.AreEqual("<script type=\"text/javascript\" src=\"js/test.js\"></script>", tag);
        }
        public void CanDebugBundleJavaScriptWithEmbeddedResource()
        {
            var tag = debugJavaScriptBundle
                      .AddEmbeddedResource("~/js/test.js", "SquishIt.Tests://EmbeddedResource.Embedded.js")
                      .Render("~/js/output_Embedded.js");

            Assert.AreEqual("<script type=\"text/javascript\" src=\"js/test.js\"></script>\n", TestUtilities.NormalizeLineEndings(tag));
            Assert.AreEqual(1, fileWriterFactory.Files.Count);
        }