public void RegisterAll_NullRegistrationProvider()
 {
     var builder = new ContainerBuilder();
     var configurator = new AutofacContainerConfigurator(builder);
     var configurationSource = new NullConfigurationSource();
     Assert.Throws<ArgumentNullException>(() => configurator.RegisterAll(configurationSource, null));
 }
 private IContainer ExecuteRegisterAllOnValidConfigurator()
 {
     var builder = new ContainerBuilder();
     var configurator = new AutofacContainerConfigurator(builder);
     var configurationSource = new NullConfigurationSource();
     var rootProvider = new StubRegistrationProvider();
     configurator.RegisterAll(configurationSource, rootProvider);
     return builder.Build();
 }
        public static void RegisterEnterpriseLibrary(this ContainerBuilder builder, IConfigurationSource configSource)
        {
            if (builder == null)
            {
                throw new ArgumentNullException("builder");
            }
            if (configSource == null)
            {
                throw new ArgumentNullException("configSource");
            }
            var configurator = new AutofacContainerConfigurator(builder);

            EnterpriseLibraryContainer.ConfigureContainer(configurator, configSource);
        }