public void Pop_an_empty_heap() { AMHeap heap = new AMHeap(); object top = heap.Pop(); Assert.IsNull(top); }
public void Pop_one_item() { AMHeap heap = new AMHeap(); ConstantTerm con = new ConstantTerm("ali"); heap.Push(con); heap.Pop(); Assert.IsNull(heap.Top()); }
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()); }