public void PluginSettings_Read_Write_Bool_Works() { _PluginSettings.Write(_Plugin, "a", true); _PluginSettings.Write(_Plugin, "b", false); _PluginSettings.Write(_Plugin, "c", (bool?)null); Assert.AreEqual(3, _PluginSettings.Values.Count); Assert.IsNotNull(_PluginSettings.Values["x.a"]); Assert.IsNotNull(_PluginSettings.Values["x.b"]); Assert.IsNull(_PluginSettings.Values["x.c"]); Assert.AreEqual(null, _PluginSettings.ReadBool(_Plugin, "z")); Assert.AreEqual(false, _PluginSettings.ReadBool(_Plugin, "z", false)); Assert.AreEqual(true, _PluginSettings.ReadBool(_Plugin, "z", true)); Assert.AreEqual(true, _PluginSettings.ReadBool(_Plugin, "a")); Assert.AreEqual(false, _PluginSettings.ReadBool(_Plugin, "b")); Assert.AreEqual(null, _PluginSettings.ReadBool(_Plugin, "c")); Assert.AreEqual(true, _PluginSettings.ReadBool(_Plugin, "a", false)); Assert.AreEqual(false, _PluginSettings.ReadBool(_Plugin, "b", true)); Assert.AreEqual(true, _PluginSettings.ReadBool(_Plugin, "c", true)); Assert.AreEqual(false, _PluginSettings.ReadBool(_Plugin, "c", false)); }