public void ModuleInstallsSettingsSource()
		{
			var module = new EasySettingsModule(_provider);

			var builder = new ContainerBuilder();
			builder.RegisterModule(module);

			var container = builder.Build();
			Assert.NotEmpty(container.ComponentRegistry.Sources.OfType<SettingsSource>());
		}
        public void ModuleInstallsSettingsSource()
        {
            var settings = new NameValueCollection();
            var module = new EasySettingsModule(settings);

            var builder = new ContainerBuilder();
            builder.RegisterModule(module);

            var container = builder.Build();
            Assert.IsTrue(container.ComponentRegistry.Sources.OfType<SettingsSource>().Any());
        }
		public void ModuleInstallsSimpleSettingsReaderByDefault()
		{
			var module = new EasySettingsModule(_provider);

			var builder = new ContainerBuilder();
			builder.RegisterModule(module);

			var container = builder.Build();
			var reader = container.Resolve<ISettingsReader>();

			Assert.NotNull(reader);
			Assert.IsType<SimpleSettingsReader>(reader);
		}
		public void ConfigurationValuesLoadedFromSuppliedCollection()
		{
			var module = new EasySettingsModule(_provider);

			var builder = new ContainerBuilder();
			builder.RegisterModule(module);

			var container = builder.Build();
			var reader = container.Resolve<ISettingsReader>();

			var instance = reader.Read<FirstSettings>();

			Assert.Equal("things", instance.Value);
		}
        public void ModuleInstallsSimpleSettingsReaderByDefault()
        {
            var settings = new NameValueCollection();
            var module = new EasySettingsModule(settings);

            var builder = new ContainerBuilder();
            builder.RegisterModule(module);

            var container = builder.Build();
            var reader = container.Resolve<ISettingsReader>();

            Assert.IsNotNull(reader);
            Assert.IsTrue(reader is SimpleSettingsReader);
        }
		public void ConfigurationValuesLoadedFromSuppliedCollection()
		{
			var settings = new NameValueCollection
			{
				{ "First:Value", "something"}
			};
			var module = new EasySettingsModule(settings);

			var builder = new ContainerBuilder();
			builder.RegisterModule(module);

			var container = builder.Build();
			var reader = container.Resolve<ISettingsReader>();

			var instance = reader.Read<FirstSettings>();

			Assert.Equal("something", instance.Value);
		}