Exemplo n.º 1
0
        public void ContainsRelativePathToAsset_ReturnsTrue()
        {
            var bundle = new TestableBundle("~/test");
            var asset  = new StubAsset("~/test/asset.js");

            bundle.Assets.Add(asset);

            bundle.ContainsPath("asset.js").ShouldBeTrue();
        }
Exemplo n.º 2
0
        public void ContainsPathOfAssetInBundleWithDifferentCasing_ReturnsTrue()
        {
            var bundle = new TestableBundle("~/test");
            var asset  = new Mock <IAsset>();

            asset.Setup(a => a.Accept(It.IsAny <IBundleVisitor>()))
            .Callback <IBundleVisitor>(v => v.Visit(asset.Object));
            asset.Setup(a => a.SourceFile.FullPath).Returns("~/test/asset.js");
            bundle.Assets.Add(asset.Object);

            bundle.ContainsPath("~\\TEST\\ASSET.js").ShouldBeTrue();
        }
Exemplo n.º 3
0
        public void ContainsPathOfAssetInBundleWithForwardSlash_ReturnsTrue()
        {
            var bundle = new TestableBundle("~/test");
            var asset  = new Mock <IAsset>();

            asset.Setup(a => a.Accept(It.IsAny <IBundleVisitor>()))
            .Callback <IBundleVisitor>(v => v.Visit(asset.Object));
            asset.Setup(a => a.Path).Returns("~/test/asset.js");
            bundle.Assets.Add(asset.Object);

            bundle.ContainsPath("~/test/asset.js").ShouldBeTrue();
        }
Exemplo n.º 4
0
        public void ContainsRelativePathToAsset_ReturnsTrue()
        {
            var bundle = new TestableBundle("~/test");
            var asset = StubAsset("~/test/asset.js");
            bundle.Assets.Add(asset);

            bundle.ContainsPath("asset.js").ShouldBeTrue();
        }
Exemplo n.º 5
0
        public void ContainsPathOfJustTheBundleItself_ReturnsTrue()
        {
            var bundle = new TestableBundle("~/test");

            bundle.ContainsPath("~/test").ShouldBeTrue();
        }
Exemplo n.º 6
0
        public void ContainsPathOfJustTheBundleItselfWithTrailingSlash_ReturnsTrue()
        {
            var bundle = new TestableBundle("~/test");

            bundle.ContainsPath("~\\test\\").ShouldBeTrue();
        }
Exemplo n.º 7
0
        public void ContainsPathOfJustTheBundleItselfWithDifferentCasing_ReturnsTrue()
        {
            var bundle = new TestableBundle("~/test");

            bundle.ContainsPath("~\\TEST").ShouldBeTrue();
        }
Exemplo n.º 8
0
        public void ContainsPathOfAssetNotInBundle_ReturnsFalse()
        {
            var bundle = new TestableBundle("~/test");

            bundle.ContainsPath("~\\test\\not-in-bundle.js").ShouldBeFalse();
        }
Exemplo n.º 9
0
        public void ContainsPathOfAssetInBundle_ReturnsTrue()
        {
            var bundle = new TestableBundle("~/test");
            var asset = new Mock<IAsset>();
            asset.Setup(a => a.Accept(It.IsAny<IBundleVisitor>()))
                 .Callback<IBundleVisitor>(v => v.Visit(asset.Object));
            asset.Setup(a => a.SourceFile.FullPath).Returns("~/test/asset.js");
            bundle.Assets.Add(asset.Object);

            bundle.ContainsPath("~\\test\\asset.js").ShouldBeTrue();
        }
Exemplo n.º 10
0
        public void ContainsPathOfAssetInBundleWithDifferentCasing_ReturnsTrue()
        {
            var bundle = new TestableBundle("~/test");
            var asset = new Mock<IAsset>();
            asset.Setup(a => a.Accept(It.IsAny<IBundleVisitor>()))
                 .Callback<IBundleVisitor>(v => v.Visit(asset.Object));
            asset.Setup(a => a.Path).Returns("~/test/asset.js");
            bundle.Assets.Add(asset.Object);

            bundle.ContainsPath("~\\TEST\\ASSET.js").ShouldBeTrue();
        }
Exemplo n.º 11
0
        public void ContainsPathOfAssetNotInBundle_ReturnsFalse()
        {
            var bundle = new TestableBundle("~/test");

            bundle.ContainsPath("~\\test\\not-in-bundle.js").ShouldBeFalse();
        }
Exemplo n.º 12
0
        public void ContainsPathOfJustTheBundleItselfWithTrailingSlash_ReturnsTrue()
        {
            var bundle = new TestableBundle("~/test");

            bundle.ContainsPath("~\\test\\").ShouldBeTrue();
        }
Exemplo n.º 13
0
        public void ContainsPathOfJustTheBundleItselfWithDifferentCasing_ReturnsTrue()
        {
            var bundle = new TestableBundle("~/test");

            bundle.ContainsPath("~\\TEST").ShouldBeTrue();
        }
Exemplo n.º 14
0
        public void ContainsPathOfJustTheBundleItself_ReturnsTrue()
        {
            var bundle = new TestableBundle("~/test");

            bundle.ContainsPath("~/test").ShouldBeTrue();
        }