MongoCacheClient의 환경설정 정보를 읽어드립니다.
Inheritance: IConfigurationSectionHandler
        public void Parse_From_Null_Section() {
            var handler = new MongoCacheSectionHandler();
            var section = new XmlDocument();

            var result = handler.Create(null, null, section);

            Assert.IsNotNull(result);
            Assert.IsTrue(result is MongoCacheConfig[]);

            var cacheConfigs = result as MongoCacheConfig[];
            Assert.AreEqual(0, cacheConfigs.Length);
        }
        public void Parse_From_Config_Section() {
            const string xmlText =
                @"<mongoCache><cache region='NFramework' connectionString='server=localhost;database=NHCaches;safe=true;' expiration='00:00:05' compressThreshold='1024' /></mongoCache>";

            var handler = new MongoCacheSectionHandler();
            var section = GetConfigurationSection(xmlText);

            var cache = CreateCache(handler.Create(null, null, section) as MongoCacheConfig[]);

            Assert.AreEqual("NSoft.NFramework", cache[0].Region);
            Assert.AreEqual(5, cache[0].Expiry.TotalSeconds);
            Assert.AreEqual(1024, cache[0].CompressThreshold);
        }
        public void Parse_From_Config_Section()
        {
            const string xmlText =
                @"<mongoCache><cache region='NFramework' connectionString='server=localhost;database=NHCaches;safe=true;' expiration='00:00:05' compressThreshold='1024' /></mongoCache>";

            var handler = new MongoCacheSectionHandler();
            var section = GetConfigurationSection(xmlText);

            var cache = CreateCache(handler.Create(null, null, section) as MongoCacheConfig[]);

            Assert.AreEqual("NSoft.NFramework", cache[0].Region);
            Assert.AreEqual(5, cache[0].Expiry.TotalSeconds);
            Assert.AreEqual(1024, cache[0].CompressThreshold);
        }
        public void Parse_From_Null_Section()
        {
            var handler = new MongoCacheSectionHandler();
            var section = new XmlDocument();

            var result = handler.Create(null, null, section);

            Assert.IsNotNull(result);
            Assert.IsTrue(result is MongoCacheConfig[]);

            var cacheConfigs = result as MongoCacheConfig[];

            Assert.AreEqual(0, cacheConfigs.Length);
        }