コード例 #1
0
        public void ValidBundleUrlTest()
        {
            BundleCollection col = new BundleCollection();

            col.Add(new Bundle("~/js"));
            BundleResolver resolver = new BundleResolver(col);

            Assert.IsTrue(resolver.IsBundleVirtualPath("~/js"));
        }
コード例 #2
0
        public void EnsureEmptyVirtualPathsDoNotThrowTest()
        {
            BundleCollection col      = new BundleCollection();
            BundleResolver   resolver = new BundleResolver(col);

            Assert.IsFalse(resolver.IsBundleVirtualPath(String.Empty));
            Assert.IsNull(resolver.GetBundleContents(String.Empty));
            Assert.IsNull(resolver.GetBundleUrl(String.Empty));
        }
コード例 #3
0
        public void EnsureNonVirtualPathsDoNotThrowTest()
        {
            BundleCollection col      = new BundleCollection();
            BundleResolver   resolver = new BundleResolver(col);

            Assert.IsFalse(resolver.IsBundleVirtualPath("missingTilde"));
            Assert.IsNull(resolver.GetBundleContents("missingTilde"));
            Assert.IsNull(resolver.GetBundleUrl("missingTilde"));
        }
コード例 #4
0
        public void NonBundleValidUrlTest()
        {
            BundleCollection col = new BundleCollection();

            col.Add(new Bundle("~/js"));
            BundleResolver resolver = new BundleResolver(col);

            Assert.IsFalse(resolver.IsBundleVirtualPath("~/nope"));
            Assert.IsNull(resolver.GetBundleContents("~/nope"));
            Assert.IsNull(resolver.GetBundleUrl("~/nope"));
        }