Pop() публичный Метод

public Pop ( ) : object
Результат object
Пример #1
0
        public void Pop_an_empty_heap()
        {
            AMHeap heap = new AMHeap();

            object top = heap.Pop();

            Assert.IsNull(top);
        }
Пример #2
0
        public void Pop_one_item()
        {
            AMHeap heap = new AMHeap();

            ConstantTerm con = new ConstantTerm("ali");

            heap.Push(con);

            heap.Pop();

            Assert.IsNull(heap.Top());
        }
Пример #3
0
        public void Pop_two_items()
        {
            AMHeap heap = new AMHeap();

            ConstantTerm con = new ConstantTerm("ali");
            ConstantTerm first = new ConstantTerm("foo");

            heap.Push(first);
            heap.Push(con);

            heap.Pop();

            Assert.AreSame(first, heap.Top());
        }