public void ShouldRenderTheExistingPackagedCssBundleInsteadOfCreatingANewOne() { var testFile = "/myfilename_combined_3_234448i484884844848848484484844848.css"; PackagerTests.delete_all_the_test_files(); PackagerTests.write_a_test_file_to_the_file_system(testFile); //make sure the file reader does not try to load the added files var tag = cssBundle .Add("~/css/test.css") .AsPackageable() .Render("~/myfilename_combined_#.css"); Assert.AreEqual("<link rel=\"stylesheet\" type=\"text/css\" href=\"/myfilename_combined_3_234448i484884844848848484484844848.css\" />", tag); }
public void ShouldRenderTheExistingPackagedJavaScriptBundleInsteadOfCreatingANewOne() { var testFile = "/myfilename_combined_3_234448i484884844848848484484844848.js"; PackagerTests.delete_all_the_test_files(); PackagerTests.write_a_test_file_to_the_file_system(testFile); //make sure the file reader does not try to load the added files var tag = javaScriptBundle .Add("~/js/test.js") .AsPackageable() .Render("~/myfilename_combined_#.js"); Assert.AreEqual("<script type=\"text/javascript\" src=\"/myfilename_combined_3_234448i484884844848848484484844848.js\"></script>", tag); }