public void Configure_ValidatesArguments()
        {
            // Arrange
            var filter = new FeatureInitialiserStartupFilter(
                Mock.Of <IServiceProvider>(),
                Mock.Of <IFeatureProvider>(),
                Mock.Of <IFeatureStateProvider>());

            // Act

            // Assert
            Assert.Throws <ArgumentNullException>(() => filter.Configure(null /* next */));
        }
        public void Configure_SkipsFeatureInitialisation_WhenFeatureDisabled()
        {
            // Arrange
            FeatureInitialisationContext capturedContext = null;

            var featureId       = new FeatureId(new ModuleId("Test"), "Test");
            var serviceProvider = Mock.Of <IServiceProvider>();
            var filter          = new FeatureInitialiserStartupFilter(
                serviceProvider,
                CreateFeatureProvider(
                    CreateFeature(featureId, fic => capturedContext = fic)),
                CreateFeatureStateProvider(featureId, false));

            Action <IApplicationBuilder> configure = _ => { };

            // Act
            filter.Configure(configure);

            // Assert
            Assert.Null(capturedContext);
        }