Example #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);
        }
Example #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);
        }
Example #3
0
 public bool TryGetValue(string key, out string value) => inner.TryGetValue(key.ToLower(), out value);