public void FloatSetGet() { Pixini p = new Pixini(); p.Set("Floater", "My", 560.896f); Assert.AreEqual(560.896f, p.Get<float>("Floater", "My")); }
public void BoolSetGet() { Pixini p = new Pixini(); p.Set("Booler", "My", true); Assert.AreEqual(true, p.Get<bool>("Booler", "My")); }
public void TestKeyValueDelete() { Pixini p = new Pixini(); p.Set("Case", "My", "suit"); p.Set("ShirtColor", "My", "red"); Assert.AreEqual("red", p.Get<string>("ShirtColor", "My")); Assert.AreEqual("suit", p["Case", "My"]); p.Delete("ShirtColor", "my"); Assert.AreEqual<string>(null, p["ShirtColor", "My"]); //Test a failed delete Assert.AreEqual<bool>(false, p.Delete("NonExitentKey", "My")); }
public void StringSetGet() { Pixini p = new Pixini(); p.Set("Case","My", "suit"); Assert.AreEqual("suit", p.Get("Case", "My", "")); Assert.AreEqual("suit", p["Case", "My"]); }
public void IntegerSetGet() { Pixini p = new Pixini(); p.Set("Integer", "My", 45); Assert.AreEqual(45, p.Get("Integer", "My", 0)); }