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>()); }
public void SchemaProviderIsNullIfSectionIsWrongType() { var testManager = new TestConfigurationManager(new NameValueCollection(), "test invalid type"); var candidate = new ConfigurationProvider(testManager).SchemaProvider; Assert.That(candidate, Is.Null); }
public void GetSectionCalledWithDefaultName() { var testManager = new TestConfigurationManager(); var candidate = new ConfigurationProvider(testManager).SchemaProvider; Assert.That(testManager.SectionName, Is.EqualTo("SimpleDataOracleConfig")); }
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>()); }
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")); }