예제 #1
0
        public void Core_Collections_ListSafe_GetValue()
        {
            var kvList = new KeyValueListString();

            kvList.Add("Key1", "Value1");
            kvList.Add("Key2", "Value2");
            Assert.IsTrue(kvList.GetValue("Key1") != string.Empty);
        }
        public void Collections_ListSafe_GetValue()
        {
            var kvList = new KeyValueListString();

            kvList.Add("Key1", "Value1");
            kvList.Add("Key2", "Value2");
            Assert.IsTrue(kvList.GetValue("Key1") != TypeExtension.DefaultString);
        }
예제 #3
0
        public void Core_Collections_ListSafe_Remove()
        {
            var kvList = new KeyValueListString();

            kvList.Add("Key1", "Value1");
            kvList.Add("Key2", "Value2");
            kvList.Remove("Key1");
            Assert.IsTrue(kvList.Count == 1);
        }
예제 #4
0
        public void Core_Collections_KeyValueListString_Add()
        {
            var kvString = new KeyValueListString();

            kvString.Add("TestKey", "TestValue");
            Assert.AreEqual(1, kvString.Count);
            kvString.Add("TestKey", "TestValue2");
            Assert.AreNotEqual(2, kvString.Count);
        }