Beispiel #1
0
        public void TestFindMissingPreferences()
        {
            CPreferences prefs = new CPreferences();

            prefs.Set("p1", "p1");
            prefs.Set("p12", "p12");
            prefs.Set("P12", "P12");
            prefs.Set("P123", "P123");
            prefs.Set("o123", "o123");

            object value;
            bool   succeed = prefs.TryGetValue("p1!", out value);

            Assert.IsFalse(succeed);
        }
Beispiel #2
0
        public void TestFindPreferences()
        {
            CPreferences prefs = new CPreferences();

            prefs.Set("p1", "p1");
            prefs.Set("p12", "p12");
            prefs.Set("P12", "P12");
            prefs.Set("P123", "P123");
            prefs.Set("o123", "o123");

            object value;
            bool   succeed = prefs.TryGetValue("p1", out value);

            Assert.IsTrue(succeed);
            Assert.AreEqual("p1", value);
        }