public void FindBundleContainingPathWithWrongPathReturnsNull() { var container = new BundleContainer(new[] { new TestableBundle("~/test") }); var actualBundle = container.FindBundlesContainingPath("~/WRONG"); actualBundle.ShouldBeEmpty(); }
public void FindBundleContainingPathOfBundleReturnsTheBundle() { var expectedBundle = new TestableBundle("~/test"); var container = new BundleContainer(new[] { expectedBundle }); var actualBundle = container.FindBundlesContainingPath("~/test").First(); actualBundle.ShouldBeSameAs(expectedBundle); }
public void FindBundleContainingPathOfAssetReturnsTheBundle() { var expectedBundle = new TestableBundle("~/test"); var asset = new Mock <IAsset>(); AssetAcceptsVisitor(asset); asset.SetupGet(a => a.SourceFile.FullPath).Returns("~/test/test.js"); expectedBundle.Assets.Add(asset.Object); var container = new BundleContainer(new[] { expectedBundle }); var actualBundle = container.FindBundlesContainingPath("~/test/test.js").First(); actualBundle.ShouldBeSameAs(expectedBundle); }
public void FindBundleContainingPathOfBundleWherePathIsMissingRootPrefixReturnsTheBundle() { var expectedBundle = new TestableBundle("~/test"); var container = new BundleContainer(new[] { expectedBundle }); var actualBundle = container.FindBundlesContainingPath("test").First(); actualBundle.ShouldBeSameAs(expectedBundle); }
public void FindBundleContainingPathOfAssetReturnsTheBundle() { var expectedBundle = new TestableBundle("~/test"); var asset = new Mock<IAsset>(); AssetAcceptsVisitor(asset); asset.SetupGet(a => a.SourceFile.FullPath).Returns("~/test/test.js"); expectedBundle.Assets.Add(asset.Object); var container = new BundleContainer(new[] { expectedBundle }); var actualBundle = container.FindBundlesContainingPath("~/test/test.js").First(); actualBundle.ShouldBeSameAs(expectedBundle); }