|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
JSR166TestCase
DelayQueueTest
public class DelayQueueTest
| Nested Class Summary |
|---|
| Field Summary |
|---|
| Fields inherited from class JSR166TestCase |
|---|
eight, expensiveTests, five, four, LONG_DELAY_MS, m1, m10, m2, m3, m4, m5, m6, MEDIUM_DELAY_MS, nine, one, seven, SHORT_DELAY_MS, six, SIZE, SMALL_DELAY_MS, TEST_STRING, three, two, zero |
| Constructor Summary | |
|---|---|
DelayQueueTest()
|
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
|
static junit.framework.Test |
suite()
|
void |
testAdd()
add succeeds |
void |
testAddAll1()
addAll(null) throws NPE |
void |
testAddAll2()
addAll of a collection with null elements throws NPE |
void |
testAddAll3()
addAll of a collection with any null elements throws NPE after possibly adding some elements |
void |
testAddAll5()
Queue contains all elements of successful addAll |
void |
testAddAllSelf()
addAll(this) throws IAE |
void |
testAddNull()
add(null) throws NPE |
void |
testBlockingTake()
Take removes existing elements until empty, then blocks interruptibly |
void |
testClear()
clear removes all elements |
void |
testConstructor1()
A new queue has unbounded capacity |
void |
testConstructor3()
Initializing from null Collection throws NPE |
void |
testConstructor4()
Initializing from Collection of null elements throws NPE |
void |
testConstructor5()
Initializing from Collection with some null elements throws NPE |
void |
testConstructor6()
Queue contains all elements of collection used to initialize |
void |
testContains()
contains(x) reports true when elements added but not yet removed |
void |
testContainsAll()
containsAll(c) is true when c contains a subset of elements |
void |
testDelay()
Delayed actions do not occur until their delay elapses |
void |
testDrainTo()
drainTo(c) empties queue into another collection c |
void |
testDrainToN()
drainTo(c, n) empties first min(n, size) elements of queue into c |
void |
testDrainToNull()
drainTo(null) throws NPE |
void |
testDrainToNullN()
drainTo(null, n) throws NPE |
void |
testDrainToSelf()
drainTo(this) throws IAE |
void |
testDrainToSelfN()
drainTo(this, n) throws IAE |
void |
testDrainToWithActivePut()
drainTo empties queue |
void |
testElement()
element returns next element, or throws NSEE if empty |
void |
testEmpty()
isEmpty is true before add, false after |
void |
testInterruptedTimedPoll()
Interrupted timed poll throws InterruptedException instead of returning timeout status |
void |
testIterator()
iterator iterates through all elements |
void |
testIteratorRemove()
iterator.remove removes current element |
void |
testOffer()
offer non-null succeeds |
void |
testOfferNull()
offer(null) throws NPE |
void |
testPeek()
peek returns next element, or null if empty |
void |
testPeekDelayed()
peek of a non-empty queue returns non-null even if not expired |
void |
testPoll()
poll succeeds unless empty |
void |
testPollDelayed()
poll of a non-empty queue returns null if no expired elements. |
void |
testPollInExecutor()
offer transfers elements across Executor tasks |
void |
testPut()
all elements successfully put are contained |
void |
testPutNull()
put(null) throws NPE |
void |
testPutWithTake()
put doesn't block waiting for take |
void |
testRemainingCapacity()
remainingCapacity does not change when elements added or removed, but size does |
void |
testRemove()
remove removes next element, or throws NSEE if empty |
void |
testRemoveAll()
removeAll(c) removes only those elements of c and reports true if changed |
void |
testRemoveElement()
remove(x) removes x and returns true if present |
void |
testRetainAll()
retainAll(c) retains only those elements of c and reports true if changed |
void |
testTake()
take retrieves elements in priority order |
void |
testTakeFromEmptyBlocksInterruptibly()
take blocks interruptibly when empty |
void |
testTimedOffer()
timed offer does not time out |
void |
testTimedPoll()
timed poll with nonzero timeout succeeds when non-empty, else times out |
void |
testTimedPoll0()
timed poll with zero timeout succeeds when non-empty, else times out |
void |
testTimedPollDelayed()
timed poll of a non-empty queue returns null if no expired elements. |
void |
testTimedPollWithOffer()
timed poll before a delayed offer fails; after offer succeeds; on interruption throws |
void |
testToArray_NullArg()
toArray(null) throws NullPointerException |
void |
testToArray()
toArray contains all elements |
void |
testToArray1_BadArg()
toArray(incompatible array type) throws ArrayStoreException |
void |
testToArray2()
toArray(a) contains all elements |
void |
testToString()
toString contains toStrings of elements |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, setName, toString |
| Methods inherited from class junit.framework.Assert |
|---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DelayQueueTest()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
public static junit.framework.Test suite()
public void testConstructor1()
public void testConstructor3()
public void testConstructor4()
public void testConstructor5()
public void testConstructor6()
public void testEmpty()
public void testRemainingCapacity()
public void testOfferNull()
public void testAddNull()
public void testOffer()
public void testAdd()
public void testAddAll1()
public void testAddAllSelf()
public void testAddAll2()
public void testAddAll3()
public void testAddAll5()
public void testPutNull()
public void testPut()
public void testPutWithTake()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testTimedOffer()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testTake()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testTakeFromEmptyBlocksInterruptibly()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testBlockingTake()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testPoll()
public void testTimedPoll0()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testTimedPoll()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testInterruptedTimedPoll()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testTimedPollWithOffer()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testPeek()
public void testElement()
public void testRemove()
public void testRemoveElement()
public void testContains()
public void testClear()
public void testContainsAll()
public void testRetainAll()
public void testRemoveAll()
public void testToArray()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testToArray2()
public void testToArray_NullArg()
public void testToArray1_BadArg()
public void testIterator()
public void testIteratorRemove()
public void testToString()
public void testPollInExecutor()
public void testDelay()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testPeekDelayed()
public void testPollDelayed()
public void testTimedPollDelayed()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testDrainToNull()
public void testDrainToSelf()
public void testDrainTo()
public void testDrainToWithActivePut()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testDrainToNullN()
public void testDrainToSelfN()
public void testDrainToN()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||