Example #1
0
        public void TestBundlerForBowerFormStaticFileWithCacheBusterOk()
        {
            //SETUP
            var b4b = new BundlerForBower(B4BSetupHelper.GetDirRelToTestDirectory("NoConfig\\"),
                                          B4BSetupHelper.GetActualFilePathFromVirtualPath(), B4BSetupHelper.GetChecksumFromRelPath());

            //ATTEMPT
            var output = b4b.FormStaticFileWithCacheBuster("url:js/myfile.js", "12345");

            //VERIFY
            output.ShouldEqual("url:js/myfile.js?v=12345");
        }
        public void TestBundlerForBowerFormStaticFileWithCacheBusterOk()
        {
            //SETUP
            var b4b = new BundlerForBower(B4BSetupHelper.GetDirRelToTestDirectory("ASPNET Core 1 Config\\"),
                                          B4BSetupHelper.GetActualFilePathFromVirtualPath(), null);

            //ATTEMPT
            var ex = Assert.Throws <NotImplementedException>(() => b4b.FormStaticFileWithCacheBuster("js/myfile.js", "12345"));

            //VERIFY
            ex.Message.ShouldEqual("The BundlerForBower config file does not support adding a cachebuster." +
                                   "It is likely that you have local tags to do that.");
        }