Package org.insa.graphs.algorithm.utils
Class PriorityQueueTest
- java.lang.Object
-
- org.insa.graphs.algorithm.utils.PriorityQueueTest
-
- Direct Known Subclasses:
BinaryHeapTest
,BinarySearchTreeTest
public abstract class PriorityQueueTest extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
PriorityQueueTest.MutableInteger
protected static class
PriorityQueueTest.TestParameters<E extends java.lang.Comparable<E>>
-
Field Summary
Fields Modifier and Type Field Description PriorityQueueTest.TestParameters<PriorityQueueTest.MutableInteger>
parameters
-
Constructor Summary
Constructors Constructor Description PriorityQueueTest()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract PriorityQueue<PriorityQueueTest.MutableInteger>
createQueue()
Needs to be implemented by child class to actually provide priority queue implementation.abstract PriorityQueue<PriorityQueueTest.MutableInteger>
createQueue(PriorityQueue<PriorityQueueTest.MutableInteger> queue)
Needs to be implemented by child class to actually provide priority queue implementation.static java.util.Collection<java.lang.Object>
data()
Set of parameters.void
init()
void
testDeleteMin()
void
testDeleteThenRemove()
void
testEmptyDeleteMin()
void
testEmptyFindMin()
void
testFindMin()
void
testInsert()
void
testIsEmpty()
void
testRemove()
void
testRemoveEmpty()
void
testRemoveNotFound()
void
testRemoveThenAdd()
void
testRemoveTwice()
void
testSize()
-
-
-
Field Detail
-
parameters
public PriorityQueueTest.TestParameters<PriorityQueueTest.MutableInteger> parameters
-
-
Method Detail
-
createQueue
public abstract PriorityQueue<PriorityQueueTest.MutableInteger> createQueue()
Needs to be implemented by child class to actually provide priority queue implementation.- Returns:
- A new instance of a PriorityQueue implementation.
-
createQueue
public abstract PriorityQueue<PriorityQueueTest.MutableInteger> createQueue(PriorityQueue<PriorityQueueTest.MutableInteger> queue)
Needs to be implemented by child class to actually provide priority queue implementation.- Parameters:
queue
- Queue to copy.- Returns:
- Copy of the given queue.
-
data
public static java.util.Collection<java.lang.Object> data()
Set of parameters.
-
init
public void init()
-
testIsEmpty
public void testIsEmpty()
-
testSize
public void testSize()
-
testInsert
public void testInsert()
-
testEmptyFindMin
public void testEmptyFindMin()
-
testFindMin
public void testFindMin()
-
testEmptyDeleteMin
public void testEmptyDeleteMin()
-
testDeleteMin
public void testDeleteMin()
-
testRemoveEmpty
public void testRemoveEmpty()
-
testRemoveNotFound
public void testRemoveNotFound()
-
testDeleteThenRemove
public void testDeleteThenRemove()
-
testRemoveTwice
public void testRemoveTwice()
-
testRemove
public void testRemove()
-
testRemoveThenAdd
public void testRemoveThenAdd()
-
-