public void Init()
 {
     _source       = SettingSourceFactory.GetSettingSource();
     _settings     = new EnvironmentSettingsCollection(_source);
     _environments = new EnvironmentCollection(_settings);
     _genformEnvs  = new GenFormEnvironmentCollection(_environments);
 }
Exemplo n.º 2
0
        public static GenFormEnvironmentCollection Create()
        {
            var source   = SettingSourceFactory.GetSettingSource();
            var settings = new EnvironmentSettingsCollection(source);
            var envs     = new EnvironmentCollection(settings);

            return(new GenFormEnvironmentCollection(envs));
        }
Exemplo n.º 3
0
        public void HaveTheSameAmountOfSettingsAsInTheSettingsFile()
        {
            var config = (new WebConfigurationFactory()).GetConfiguration();
            var count  = config.ConnectionStrings.ConnectionStrings.Count;

            count += config.AppSettings.Settings.Count;

            var source = SettingSourceFactory.GetSettingSource();

            Assert.AreEqual(count, source.Count);
        }
Exemplo n.º 4
0
        public void SettingSourceFactoryTestMethod_IsNotNull()
        {
            var setting = SettingSourceFactory.GetSettingSource();

            Assert.IsNotNull(setting);
        }
Exemplo n.º 5
0
        public void SettingSourceFactoryTestMethod_ByName()
        {
            var setting2 = SettingSourceFactory.GetSettingSource("SimpleFileSettingSource");

            Assert.IsNotNull(setting2);
        }
Exemplo n.º 6
0
 private static EnvironmentSettingsCollection CreateEnvironmentSettings()
 {
     return(new EnvironmentSettingsCollection(SettingSourceFactory.GetSettingSource()));
 }