public void PropertiesDataConverterTest() { IDataConverter dataConverter = new PropertiesDataConverter(); ConfigTest1 configTest1 = (ConfigTest1)dataConverter.Parse(typeof(ConfigTest1), Constant.PropertiesDataConverterTestValue1); Assert.IsNotNull(configTest1); Assert.AreEqual("127.0.0.1", configTest1.Host); Assert.AreEqual(81, configTest1.Port); }
public void ConfigTest1Test() { ConfigTest1 configTest1 = ConfigManager.GetConfigClass <ConfigTest1>(); Assert.AreEqual("127.0.0.1", configTest1.Host); Assert.AreEqual(81, configTest1.Port); IDictionary <string, string> configTest1Dictionary = ConfigManager.GetConfigValue <IDictionary <string, string> >("PropertiesDataConverterTestValue1"); Assert.AreEqual("127.0.0.1", configTest1Dictionary.Get <string>("Host")); Assert.AreEqual(81, configTest1Dictionary.Get <int>("Port")); }