public void TestFindMissingPreferences() { Preferences prefs = new Preferences(); 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); }
public void TestFindPreferences() { Preferences prefs = new Preferences(); 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); }