예제 #1
0
        public void CanTryGetValueFromAutoDictionaryWhenNoEntryExists()
        {
            AutoDictionary <string, bool> tested = new AutoDictionary <string, bool>();

            Assert.AreEqual(true, tested.TryGetValue("Hello", out bool outvalue));
            Assert.AreEqual(false, outvalue);
        }
예제 #2
0
        public void CanTryGetValueFromAutoDictionary()
        {
            AutoDictionary <string, bool> tested = new AutoDictionary <string, bool>();

            tested["Hello"] = true;
            Assert.AreEqual(true, tested.TryGetValue("Hello", out bool outvalue));
            Assert.AreEqual(true, outvalue);
        }
예제 #3
0
 public bool TryGetValue(string key, out string value) => inner.TryGetValue(key.ToLower(), out value);