public void WhenAddWithCustomizeAction_ThenCustomizeActionCalledWithTheBundle() { fileSearch .Setup(s => s.FindFiles(It.IsAny <IDirectory>())) .Returns(new[] { StubFile() }); Bundle bundle = null; Action <TestableBundle> action = b => bundle = b; bundles.Add("~/test", action); bundle.ShouldBeSameAs(createdBundle); }
public void GivenBundleCustomizeAction_WhenAddPerSubDirectory_ThenActionIsCalledWithBundle() { settings.SourceDirectory = new FakeFileSystem { "~/bundle/file.js" }; Bundle bundle = null; bundles.AddPerSubDirectory <TestableBundle>("~", b => bundle = b); bundle.ShouldBeSameAs(createdBundle); }