public void SetUp() { _stubConfigurationSection = new StubExtendedConfigurationSection("WellKnown", "defaultProvider", "Default Value", "providers"); _providerHelper = _stubConfigurationSection.GetStubProviderHelper(); _propertyCollection = _stubConfigurationSection.GetProperties(); _providerHelper.InitializeProperties(_propertyCollection); }
// construction and disposing public StubExtendedConfigurationSection( string wellKnownProviderID, string defaultProviderName, string defaultProviderID, string providerCollectionName ) { _stubProviderHelper = new StubProviderHelper(this, wellKnownProviderID, defaultProviderName, defaultProviderID, providerCollectionName); _stubProviderHelper.InitializeProperties(_properties); }
public void GetProvider_WithoutDefaultProvider() { StubExtendedConfigurationSection stubConfigurationSection = new StubExtendedConfigurationSection("WellKnown", "defaultProvider", null, "providers"); StubProviderHelper providerHelper = stubConfigurationSection.GetStubProviderHelper(); providerHelper.InitializeProperties(_stubConfigurationSection.GetProperties()); Assert.That(providerHelper.Provider, Is.Null); }