Inheritance: IConfigurationManager
コード例 #1
0
 public void SchemaProviderIsReturnedIfFound()
 {
     var sdo = new SdoConfigSection();
     var testManager = new TestConfigurationManager(new NameValueCollection(), sdo);
     var candidate = new ConfigurationProvider(testManager).SchemaProvider;
     Assert.That(candidate, Is.TypeOf<ConfigSchemaProvider>());
 }
コード例 #2
0
        public void SchemaProviderIsNullIfSectionIsWrongType()
        {
            var testManager = new TestConfigurationManager(new NameValueCollection(), "test invalid type");
            var candidate   = new ConfigurationProvider(testManager).SchemaProvider;

            Assert.That(candidate, Is.Null);
        }
コード例 #3
0
        public void GetSectionCalledWithDefaultName()
        {
            var testManager = new TestConfigurationManager();
            var candidate   = new ConfigurationProvider(testManager).SchemaProvider;

            Assert.That(testManager.SectionName, Is.EqualTo("SimpleDataOracleConfig"));
        }
コード例 #4
0
        public void SchemaProviderIsReturnedIfFound()
        {
            var sdo         = new SdoConfigSection();
            var testManager = new TestConfigurationManager(new NameValueCollection(), sdo);
            var candidate   = new ConfigurationProvider(testManager).SchemaProvider;

            Assert.That(candidate, Is.TypeOf <ConfigSchemaProvider>());
        }
コード例 #5
0
        public void GetSectionCalledWithSuppliedName()
        {
            var testManager = new TestConfigurationManager(new NameValueCollection {
                { "Simple.Data.Oracle.ConfigSectionName", "config" }
            });
            var candidate = new ConfigurationProvider(testManager).SchemaProvider;

            Assert.That(testManager.SectionName, Is.EqualTo("config"));
        }
コード例 #6
0
 public void SchemaProviderIsNullIfSectionIsWrongType()
 {
     var testManager = new TestConfigurationManager(new NameValueCollection(), "test invalid type");
     var candidate = new ConfigurationProvider(testManager).SchemaProvider;
     Assert.That(candidate, Is.Null);
 }
コード例 #7
0
 public void GetSectionCalledWithSuppliedName()
 {
     var testManager = new TestConfigurationManager(new NameValueCollection { { "Simple.Data.Oracle.ConfigSectionName", "config" } });
     var candidate = new ConfigurationProvider(testManager).SchemaProvider;
     Assert.That(testManager.SectionName, Is.EqualTo("config"));
 }
コード例 #8
0
 public void GetSectionCalledWithDefaultName()
 {
     var testManager = new TestConfigurationManager();
     var candidate = new ConfigurationProvider(testManager).SchemaProvider;
     Assert.That(testManager.SectionName, Is.EqualTo("SimpleDataOracleConfig"));
 }