Пример #1
0
        public void Clear_1Point()
        {
            IIntegerList list = new IntegerList();

            list.Add(1);
            list.Add(2);
            list.Add(3);
            Assert.AreEqual(3, list.Count);

            list.Clear();
            Assert.AreEqual(0, list.Count);
        }
Пример #2
0
        public void Contains_1Point()
        {
            IIntegerList list = new IntegerList();

            list.Add(11);
            list.Add(22);
            list.Add(33);
            Assert.IsTrue(list.Contains(33));
            Assert.IsTrue(list.Contains(22));
            Assert.IsTrue(list.Contains(11));
            Assert.IsFalse(list.Contains(44));

            list.Clear();
            Assert.IsFalse(list.Contains(33));
        }