예제 #1
0
        public void TestDeleteFirstAndOne()
        {
            var l = new MyList.MyList <int>();

            l.Add(1);
            l.Delete(1);
            var list = l.ToList();

            Assert.AreEqual(0, list.Length);
        }
예제 #2
0
        public void TestDeleteMiddle()
        {
            var l = new MyList.MyList <int>();

            l.Add(1);
            l.Add(2);
            l.Add(3);
            l.Delete(2);
            var list = l.ToList();

            Assert.AreEqual(2, list.Length);
            Assert.AreEqual(true, Eq(list, new int[] { 1, 3 }));
        }