Exemplo n.º 1
0
        public void ClearEmptyList()
        {
            EmptyLinkedList.Clear();

            Assert.That(EmptyLinkedList.Head, Is.Null);
            Assert.That(EmptyLinkedList.Tail, Is.Null);
            Assert.That(EmptyLinkedList.Count, Is.EqualTo(0));
        }
        public void AddLastToEmptyList()
        {
            EmptyLinkedList.AddLast(Item);

            Assert.That(EmptyLinkedList.Head.Value, Is.EqualTo(Item));
            Assert.That(EmptyLinkedList.Tail.Value, Is.EqualTo(Item));
            Assert.That(EmptyLinkedList.Count, Is.EqualTo(1));
        }
Exemplo n.º 3
0
 public void RemoveFromEmptyList()
 {
     Assert.Throws <ArgumentOutOfRangeException>(() => EmptyLinkedList.Remove(Items[0]));
 }
 public void Contains_EmptyList()
 {
     Assert.That(EmptyLinkedList.Contains(Item), Is.False);
 }