Exemple #1
0
        public void TestLength()
        {
            MyLinkedList list = new MyLinkedList();

            list.Add(1);
            list.Add(2);
            list.Add(3);

            Assert.That(list.Length(), Is.EqualTo(3));
        }
Exemple #2
0
        public void TestRemove()
        {
            MyLinkedList list = new MyLinkedList();

            list.Add(1);
            list.Add(2);
            list.Add(3);


            list.Remove(2);

            Assert.That(list.Length(), Is.EqualTo(2));
            Assert.That(list.Get(0), Is.EqualTo(1));
            Assert.That(list.Get(1), Is.EqualTo(3));
        }