コード例 #1
0
        public void UrlModifierModifyIsCalled()
        {
            UrlGenerator.CreateBundleUrl(StubScriptBundle("~/test"));
            var expectedUrl = "cassette.axd/script/" + expectedHash + "/test";

            UrlModifier.Verify(m => m.Modify(expectedUrl));
        }
コード例 #2
0
        public void CreateBundleUrlCallsBundleUrlProperty()
        {
            var bundle = new TestableBundle("~")
            {
                Hash = new byte[] {}
            };

            var url = UrlGenerator.CreateBundleUrl(bundle);

            url.ShouldEqual("_cassette/testablebundle/_");
        }
コード例 #3
0
        public void CreateBundleUrlCallsBundleUrlProperty()
        {
            var bundle = new TestableBundle("~")
            {
                Hash = new byte[] { 1, 2, 3 }
            };

            var url = UrlGenerator.CreateBundleUrl(bundle);

            url.ShouldEqual("cassette.axd/" + bundle.Url);
        }
コード例 #4
0
        public void CreateStylesheetBundleUrlReturnsUrlWithRoutePrefixAndBundleTypeAndPathAndHash()
        {
            var url = UrlGenerator.CreateBundleUrl(StubStylesheetBundle("~/test/foo"));

            url.ShouldEqual("_cassette/stylesheetbundle/test/foo_010203");
        }
コード例 #5
0
 public void UrlModifierModifyIsCalled()
 {
     UrlGenerator.CreateBundleUrl(StubScriptBundle("~/test"));
     UrlModifier.Verify(m => m.Modify("_cassette/scriptbundle/test_010203"));
 }
コード例 #6
0
        public void CreateStylesheetBundleUrlReturnsUrlWithRoutePrefixAndBundleTypeAndHashAndPath()
        {
            var url = UrlGenerator.CreateBundleUrl(StubStylesheetBundle("~/test/foo"));

            url.ShouldEqual("cassette.axd/stylesheet/" + expectedHash + "/test/foo");
        }