コード例 #1
0
        public void OddKeyBool()
        {
            var storage = new PreferenceStorage ();

            var expectedBool = true;
            storage.SetBool (Key2, expectedBool);

            var b = storage.GetBool (Key);
            Assert.AreEqual (PreferenceStorage.Defaults.Bool, b);

            var b2 = storage.GetBool (Key2);
            Assert.AreEqual (expectedBool, b2);
        }
コード例 #2
0
        public void SetGetBool()
        {
            var storage = new PreferenceStorage ();
            var expected = true;

            storage.SetBool (Key, expected);
            {
                var actual = storage.GetBool (Key);
                Assert.AreEqual (expected, actual);
            }

            storage.SetBool (Key, expected && false);
            {
                var actual = storage.GetBool (Key);
                Assert.AreEqual (expected && false, actual);
            }
        }