public void IsEmpty() { DLinkedList<int>emptyList = new DLinkedList<int>(); bool expectedResult = true, result; result = emptyList.IsEmpty(); Assert.AreEqual(expectedResult, result); }
public void AddOneRemoveOne() { linklist.Clear(); linklist.Append(1); Assert.AreEqual(1, linklist.Count); linklist.RemoveTail(); Assert.AreEqual(true, linklist.IsEmpty()); }
public void Clear() { DLinkedList<string> list = new DLinkedList<string>(); list.PushBack("a"); list.PushBack("b"); list.PushBack("c"); list.PushBack("d"); list.PushBack("e"); list.PushBack("f"); list.Clear(); Assert.IsTrue(list.IsEmpty()); }