public void CfgMgr_Ini_Read_Empty() { string path = Path.Combine(localFolder, file_1_empty); IniConfigSystem cfgsys = new IniConfigSystem(); configManager = new CfgManager(path, cfgsys); configManager.ReadConfig(); Assert.AreEqual(0, configManager.GetDictionary().Count, "Dictionary should be empty"); }
public void CfgMgr_Ini_Write() { string path = Path.Combine(localFolder, file_ini_1_out); IniConfigSystem cfgsys = new IniConfigSystem(); configManager = new CfgManager(path, cfgsys); configManager.SetDictionary(dicoIni); configManager.WriteConfig(); Assert.IsTrue(FileCompare(Path.Combine(localFolder, file_ini_1_out), Path.Combine(localFolder, file_ini_1)), "Files are not the same"); }
public void CfgMgr_Ini_Read_CfgSysInstance() { string path = Path.Combine(localFolder, file_ini_1); IniConfigSystem cfgsys = new IniConfigSystem(); configManager = new CfgManager(path, cfgsys); configManager.ReadConfig(); Assert.AreEqual(5, configManager.GetDictionary().Count, "Dictionary Size should be 5"); string value1 = configManager.GetValue("general_long"); Assert.AreEqual("string with more data", value1, "Content of \"general_long\" should be \"string with more data\""); string value2 = configManager.GetValue("general_foo"); Assert.AreEqual("bar", value2, "Content for \"general_foo\" should be \"bar\""); string value3 = configManager.GetValue("general_bar"); Assert.AreEqual("", value3, "Content for \"general_bar\" should be empty"); }