예제 #1
0
        public void CanRenderDistinctBundlesIfSameOutputButDifferentArbitrary()
        {
            var tag = javaScriptBundle
                      .AddString(javaScript)
                      .Render("~/js/output#.js");

            var tag2 = javaScriptBundle2
                       .AddString(javaScript2)
                       .Render("~/js/output#.js");

            Assert.AreNotEqual(tag, tag2);
        }
예제 #2
0
        public void CanRenderArbitraryStringsInDebugAsCached()
        {
            var content = debugJavaScriptBundle
                          .AddString(javaScript)
                          .Add("~/js/test.js")
                          .AsCached("Test3", "~/js/output_2.js");

            var cachedContent = debugJavaScriptBundle.RenderCached("Test3");

            debugJavaScriptBundle.ClearCache();

            var generatedContent = debugJavaScriptBundle.RenderCached("Test3");

            Assert.AreEqual(cachedContent, content);
            Assert.AreEqual(cachedContent, generatedContent);
        }