public void Test_GetDefaultConfigValueNoGroup() { ParseConfig config = new ParseConfig(TestHelper.GetNodeConfigPath()); string value = config.GetValue("not existant", "not existant", "Value"); Assert.AreEqual("Value", value); }
public void Test_GetSectionConfigValue() { ParseConfig config = new ParseConfig(TestHelper.GetNodeConfigPath()); string value = config.GetValue("CONFIG_VALUE", "Test Group"); Assert.AreEqual("testing", value); }
public void Test_GetConfigValue() { ParseConfig config = new ParseConfig(TestHelper.GetNodeConfigPath()); string value = config.GetValue("CLOUD_DOMAIN"); Assert.AreEqual("example.com", value); }
public void Test_GetConfigComents() { ParseConfig config = new ParseConfig(TestHelper.GetNodeConfigPath()); string value = config.GetValue("MOTD_FILE"); Assert.AreEqual(value, ""); }
public void Test_AddKeyParserConfig() { ParseConfig config = new ParseConfig(TestHelper.GetNodeConfigPath()); string newFilePath = System.IO.Path.GetTempFileName(); config.WriteValue("NEWKEY", "NEWVALUE"); config.Save(newFilePath); ParseConfig newConfig = new ParseConfig(newFilePath); string value = newConfig.GetValue("NEWKEY"); Assert.AreEqual("NEWVALUE", value); File.Delete(newFilePath); }