public ExceptionCatchingBundleCollectionInitializer_WhereInitializerImplementationDoesNotThrowException()
        {
            bundleCollection = new BundleCollection(new CassetteSettings(), Mock.Of<IFileSearchProvider>(), Mock.Of<IBundleFactoryProvider>());

            initializerThatThrows = new Mock<IBundleCollectionInitializer>();

            initializer = new ExceptionCatchingBundleCollectionInitializer(initializerThatThrows.Object);
            initializer.Initialize(bundleCollection);
        }
        public ExceptionCatchingBundleCollectionInitializer_WhereInitializerImplementationDoesNotThrowException()
        {
            bundleCollection = new BundleCollection(new CassetteSettings(), Mock.Of <IFileSearchProvider>(), Mock.Of <IBundleFactoryProvider>());

            initializerThatThrows = new Mock <IBundleCollectionInitializer>();

            initializer = new ExceptionCatchingBundleCollectionInitializer(initializerThatThrows.Object);
            initializer.Initialize(bundleCollection);
        }
        public ExceptionCatchingBundleCollectionInitializer_WhereInitializerImplementationThrowsException()
        {
            bundleCollection = new BundleCollection(new CassetteSettings(), Mock.Of<IFileSearchProvider>(), Mock.Of<IBundleFactoryProvider>());
            bundleCollection.Add(new TestableBundle("~")); // Add a bundle so we can check the collection gets cleared.

            initializerThatThrows = new Mock<IBundleCollectionInitializer>();
            exception = new Exception();
            initializerThatThrows
                .Setup(i => i.Initialize(bundleCollection))
                .Throws(exception);

            initializer = new ExceptionCatchingBundleCollectionInitializer(initializerThatThrows.Object);
            initializer.Initialize(bundleCollection);
        }
        public ExceptionCatchingBundleCollectionInitializer_WhereInitializerImplementationThrowsException()
        {
            bundleCollection = new BundleCollection(new CassetteSettings(), Mock.Of <IFileSearchProvider>(), Mock.Of <IBundleFactoryProvider>());
            bundleCollection.Add(new TestableBundle("~")); // Add a bundle so we can check the collection gets cleared.

            initializerThatThrows = new Mock <IBundleCollectionInitializer>();
            exception             = new Exception();
            initializerThatThrows
            .Setup(i => i.Initialize(bundleCollection))
            .Throws(exception);

            initializer = new ExceptionCatchingBundleCollectionInitializer(initializerThatThrows.Object);
            initializer.Initialize(bundleCollection);
        }