|
||||||||
| 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
FutureTaskTest
public class FutureTaskTest
| 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 | |
|---|---|
FutureTaskTest()
|
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
|
static junit.framework.Test |
suite()
|
void |
testCancelAfterRun()
cancel of a completed task fails |
void |
testCancelBeforeRun()
Cancelling before running succeeds |
void |
testCancelBeforeRun2()
Cancel(true) before run succeeds |
void |
testCancelInterrupt()
cancel(true) interrupts a running task |
void |
testCancelNoInterrupt()
cancel(false) does not interrupt a running task |
void |
testConstructor()
Creating a future with a null callable throws NPE |
void |
testConstructor2()
creating a future with null runnable fails |
void |
testGet_Cancellation()
Cancelling a task causes get in another thread to throw CancellationException |
void |
testGet_ExecutionException()
A runtime exception in task causes get to throw ExecutionException |
void |
testGet_InterruptedException()
Interrupting a waiting get causes it to throw InterruptedException |
void |
testGet_TimeoutException()
A timed out timed get throws TimeoutException |
void |
testGetRun()
run in one thread causes get in another thread to retrieve value |
void |
testGetSet()
set in one thread causes get in another thread to retrieve value |
void |
testIsDone()
isDone is true when a task completes |
void |
testResetAfterCancel()
runAndReset after cancellation fails |
void |
testRunAndReset()
runAndReset of a non-cancelled task succeeds |
void |
testSet()
setting value causes get to return it |
void |
testSetException()
setException causes get to throw ExecutionException |
void |
testTimedGet_Cancellation()
Cancelling a task causes timed get in another thread to throw CancellationException |
void |
testTimedGet_ExecutionException2()
A runtime exception in task causes timed get to throw ExecutionException |
void |
testTimedGet_InterruptedException2()
Interrupting a waiting timed get causes it to throw InterruptedException |
void |
testTimedGetRun()
run in one thread causes timed get in another thread to retrieve value |
void |
testTimedGetSet()
set in one thread causes timed get in another thread to retrieve value |
| 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 FutureTaskTest()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
public static junit.framework.Test suite()
public void testConstructor()
public void testConstructor2()
public void testIsDone()
public void testRunAndReset()
public void testResetAfterCancel()
public void testSet()
throws java.lang.Exception
java.lang.Exception
public void testSetException()
throws java.lang.Exception
java.lang.Exceptionpublic void testCancelBeforeRun()
public void testCancelBeforeRun2()
public void testCancelAfterRun()
public void testCancelInterrupt()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testCancelNoInterrupt()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testGetRun()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testGetSet()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testTimedGetRun()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testTimedGetSet()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testTimedGet_Cancellation()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testGet_Cancellation()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testGet_ExecutionException()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testTimedGet_ExecutionException2()
throws java.lang.Exception
java.lang.Exception
public void testGet_InterruptedException()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testTimedGet_InterruptedException2()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testGet_TimeoutException()
throws java.lang.Exception
java.lang.Exception
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||