Example #1
0
 public void Remove_NullFromEmpty()
 {
     if (deq.Remove(null))
     {
         throw new Exception("Attempt to remove null from epmty deque succeeded.");
     }
 }
        public void removeElement_whenFound(IDeque <SimpleLinkedValue> deque)
        {
            SimpleLinkedValue first = deque.Peek();

            Assert.That(deque.Remove(first), Is.True);
            Assert.That(deque, HasCount((int)Capacity() - 1));
            Assert.That(deque.Contains(first), Is.False);
        }
Example #3
0
 public void Remove(int index, int deqLenght, int item = 669)
 {
     for (int i = 0; i < deqLenght; i++)
     {
         if (i == index)
         {
             fake.Add(item);
             deq.Add(item);
         }
         else
         {
             int a = rint;
             fake.Add(a);
             deq.Add(a);
         }
     }
     fake.Remove(item);
     deq.Remove(item);
     CompareAndAssert();
 }
 public void removeElement_notFound(IDeque <SimpleLinkedValue> deque)
 {
     Assert.That(deque.Remove(new SimpleLinkedValue(0)), Is.False);
 }