Example #1
0
        public void Remove_Item()
        {
            var vg  = new VariablesGroup();
            var kvp = new KeyValuePair <string, IVariable>("theKey", new IntVariable(12));

            vg.Add(kvp);
            vg.Remove(kvp);

            Assert.That(vg.Count, Is.EqualTo(0));
            Assert.That(vg.Remove("non-existent"), Is.EqualTo(false));
        }
Example #2
0
        public void Remove_Key_Value_Pair()
        {
            var vg = new VariablesGroup {
                { "theKey", new IntVariable(12) }
            };

            vg.Remove("theKey");

            Assert.That(vg.Count, Is.EqualTo(0));
            Assert.That(vg.Remove("non-existent"), Is.EqualTo(false));
        }