public void PatternLayoutConverterProperties()
        {
            XmlDocument log4netConfig = new XmlDocument();

            log4netConfig.LoadXml(@"
                <Soyo.Base.Log>
                  <appender name=""StringAppender"" type=""UnitTest.Base.Log.StringAppender"">
                    <layout type=""Soyo.Base.Text.LayoutPattern"">
                        <converter>
                            <name value=""propertyKeyCount"" />
                            <type value=""UnitTest.Base.Log.PropertyKeyCountPatternLayoutConverter"" />
                            <property>
                                <key value=""one-plus-one"" />
                                <value value=""2"" />
                            </property>
                            <property>
                               <key value=""two-plus-two"" />
                               <value value=""4"" />
                            </property> 
                        </converter>
                        <pattern value=""%propertyKeyCount"" />
                    </layout>
                  </appender>
                  <root>
                    <level value=""ALL"" />                  
                    <appender-ref ref=""StringAppender"" />
                  </root>  
                </Soyo.Base.Log>");

            ILoggerController rep = LogManager.CreateController(Guid.NewGuid().ToString());

            XmlConfig.Config(rep, log4netConfig["Soyo.Base.Log"]);

            ILog log = LogManager.Get(rep.Name, "PatternLayoutConverterProperties");

            log.Debug("Message");

            PropertyKeyCountPatternLayoutConverter converter =
                PropertyKeyCountPatternLayoutConverter.MostRecentInstance;

            Assert.AreEqual(2, converter.PropertySet.Count);
            Assert.AreEqual("4", converter.PropertySet["two-plus-two"]);

            StringAppender appender =
                (StringAppender)LogManager.GetController(rep.Name).AppenderSet[0];

            Assert.AreEqual("2", appender.GetString());
        }
 public PropertyKeyCountPatternLayoutConverter()
 {
     mostRecentInstance = this;
 }