示例#1
0
        public void MapUtils_ContainsKey1()
        {
            Dictionary <object, object> dictionary = new Dictionary <object, object>();
            bool result = MapUtils.ContainsKey(dictionary, null);

            Assert.IsNotNull(result);
            Assert.AreEqual(false, result);
            Assert.AreEqual("False", result.ToString());
        }
示例#2
0
        public void MapUtils_ContainsKey2()
        {
            IDictionary <string, int> dictionary = new Dictionary <string, int>();

            dictionary.Add("1", 1);
            dictionary.Add("2", 2);
            dictionary.Add("3", 3);
            bool result = MapUtils.ContainsKey(dictionary, "2");

            Assert.IsNotNull(result);
            Assert.AreEqual(true, result);
            Assert.AreEqual("True", result.ToString());
        }