[Test] public void IntAsBoolResourceSettingTest_def_FALSE() { IResource setting = Core.ResourceStore.BeginNewResource("Setting"); setting.EndUpdate(); IntAsBoolResourceSetting intSetting = new IntAsBoolResourceSetting(setting, _NUM, new BoolSetting("Test", "Test", false)); intSetting.Load(); Assert.AreEqual(false, intSetting.Value); }
[Test] public void IntAsBoolResourceSettingTest_set_minus_1() { IResource setting = Core.ResourceStore.BeginNewResource("Setting"); setting.SetProp(_NUM, -1); setting.EndUpdate(); IntAsBoolResourceSetting intSetting = new IntAsBoolResourceSetting(setting, _NUM, new BoolSetting("Test", "Test", true)); intSetting.Load(); Assert.AreEqual(false, intSetting.Value); }
[Test] public void IntAsBoolResourceSettingTest_set_false_and_check() { IResource setting = Core.ResourceStore.BeginNewResource("Setting"); setting.EndUpdate(); IntAsBoolResourceSetting intSetting = new IntAsBoolResourceSetting(setting, _NUM, new BoolSetting("Test", "Test", true)); intSetting.Load(); Assert.AreEqual(true, intSetting.Value); intSetting.Save(false); IResourceList list = Core.ResourceStore.GetAllResources("Setting"); Assert.AreEqual(1, list.Count); Assert.AreEqual(-1, list[0].GetIntProp(_NUM)); }