public bool Remove_IntValue_CorrectedResult(int[] values, int value)
        {
            AddValues(values);

            _intSet.Remove(value);

            return(_intSet.Contains(value));
        }
示例#2
0
        public void TestRemoves()
        {
            var set = new BinaryTreeSet <int>();

            set.Add(1);

            Assert.IsTrue(set.Remove(1));;
            Assert.AreEqual(0, set.Count);;
        }
示例#3
0
        public void TestRemovesWihDeepTree()
        {
            var set = new BinaryTreeSet <string>();

            set.Add("D");
            set.Add("C");
            set.Add("B");
            set.Add("G");
            set.Add("E");
            set.Add("F");

            Assert.IsTrue(set.Remove("D"));;
            Assert.AreEqual(5, set.Count);;
        }
示例#4
0
        public void TestRemoveNotAdded()
        {
            var set = new BinaryTreeSet <int>();

            Assert.IsFalse(set.Remove(1));;
        }