Exemplo n.º 1
0
        public void ContainsTest()
        {
            CLArguments containsList = this.Template.Clone();

            Assert.IsTrue(containsList.Contains(KEY),
                          "List does not contains existing key");
            Assert.IsTrue(containsList.Contains(VALUE),
                          "List does not contains existing value");
            Assert.IsFalse(containsList.Contains(NOT_EXIST_KEY),
                           "List contains non-existing key");
            Assert.IsFalse(containsList.Contains(NOT_EXIST_VALUE),
                           "List contains non-existing value");
        }
Exemplo n.º 2
0
        public void RemoveAtTest()
        {
            CLArguments removeList = this.Template.Clone();

            removeList.RemoveAt(removeList.IndexOf(VALUE));
            Assert.IsFalse(removeList.Contains(VALUE),
                           "Existing item removed, but lasted in the list");
        }
Exemplo n.º 3
0
        public void RemoveKeyTest()
        {
            CLArguments removeList = this.Template.Clone();

            Assert.IsFalse(removeList.RemoveKey(NOT_EXIST_KEY),
                           "Did \"removed\" non-existant key");
            Assert.IsTrue(removeList.RemoveKey(KEY),
                          "Didn't removed existant key");

            var keyAndValuesExistance = new bool[]
            {
                removeList.Contains(KEY),
                removeList.Contains(VALUE),
                removeList.Contains(SEC_VALUE),
            };

            Assert.IsTrue(keyAndValuesExistance.All(isContain => !isContain),
                          "Key, or some of it's values still exists in list");
        }
Exemplo n.º 4
0
        public void RemoveTest()
        {
            CLArguments removeList = this.Template.Clone();

            Assert.IsFalse(removeList.Remove(NOT_EXIST_VALUE),
                           "Non-existing item was \"removed\"");
            Assert.IsTrue(removeList.Remove(VALUE),
                          "Exsting item wasn't removed");
            Assert.IsFalse(removeList.Contains(VALUE),
                           "Existing item removed, but lasted in the list");
        }