public void MergingWithCollectionOverwritesExistingKeys()
 {
     ConfigurationSourceBaseImpl source = GetConfigurationSource();
     var section = new ConfigurationSection( SectionName );
     section.Set( Key, Key );
     var source2 = new ConfigurationSourceBaseImpl { section };
     Assert.AreEqual( Value, source.Sections[SectionName].Get<string>( Key ) );
     source.Merge( new[] { source2 } );
     Assert.AreEqual( Key, source.Sections[SectionName].Get<string>( Key ) );
 }
 protected static ConfigurationSourceBaseImpl GetConfigurationSource()
 {
     var section = new ConfigurationSection( SectionName );
     var source = new ConfigurationSourceBaseImpl { section };
     section.Set( Key, Value );
     return source;
 }
 public void MergingWithCollectionAddsConfigurationSection()
 {
     ConfigurationSourceBaseImpl source = GetConfigurationSource();
     const string sectionName = SectionName + Key;
     var section = new ConfigurationSection( sectionName );
     section.Set( Key, Key );
     var source2 = new ConfigurationSourceBaseImpl { section };
     source.Merge( new[] { source2 } );
     Assert.IsTrue( UnitExt.Contains( section, source ) );
 }