|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
com.google.common.util.concurrent.testing.AbstractListenableFutureTest
com.google.common.util.concurrent.testing.AbstractCheckedFutureTest
@Beta public abstract class AbstractCheckedFutureTest
Test case to make sure the CheckedFuture.checkedGet() and
CheckedFuture.checkedGet(long, TimeUnit) methods work correctly.
| Field Summary |
|---|
| Fields inherited from class com.google.common.util.concurrent.testing.AbstractListenableFutureTest |
|---|
future, latch |
| Constructor Summary | |
|---|---|
AbstractCheckedFutureTest()
|
|
| Method Summary | ||
|---|---|---|
protected abstract void |
checkCancelledException(Exception e)
Checks that the exception is the correct type of cancellation exception. |
|
protected abstract void |
checkExecutionException(Exception e)
Checks that the exception is the correct type of execution exception. |
|
protected abstract void |
checkInterruptedException(Exception e)
Checks that the exception is the correct type of interruption exception. |
|
protected abstract
|
createCheckedFuture(V value,
Exception except,
CountDownLatch waitOn)
More specific type for the create method. |
|
protected
|
createListenableFuture(V value,
Exception except,
CountDownLatch waitOn)
Constructs a listenable future with a value available after the latch has counted down. |
|
void |
testCheckedGetThrowsApplicationExceptionOnCancellation()
Tests that the CheckedFuture.checkedGet() method throws the correct
type of cancellation exception when it is cancelled. |
|
void |
testCheckedGetThrowsApplicationExceptionOnError()
|
|
void |
testCheckedGetThrowsApplicationExceptionOnInterruption()
|
|
| Methods inherited from class com.google.common.util.concurrent.testing.AbstractListenableFutureTest |
|---|
setUp, tearDown, testAllListenersCompleteSuccessfully, testCanceledFutureThrowsCancellation, testGetBlocksUntilValueAvailable, testListenersNotifiedOnError, testTimeoutOnGetWorksCorrectly |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, runTest, 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 AbstractCheckedFutureTest()
| Method Detail |
|---|
protected abstract <V> CheckedFuture<V,?> createCheckedFuture(V value,
Exception except,
CountDownLatch waitOn)
protected abstract void checkCancelledException(Exception e)
protected abstract void checkExecutionException(Exception e)
protected abstract void checkInterruptedException(Exception e)
protected <V> ListenableFuture<V> createListenableFuture(V value,
Exception except,
CountDownLatch waitOn)
AbstractListenableFutureTest
createListenableFuture in class AbstractListenableFutureTestpublic void testCheckedGetThrowsApplicationExceptionOnCancellation()
CheckedFuture.checkedGet() method throws the correct
type of cancellation exception when it is cancelled.
public void testCheckedGetThrowsApplicationExceptionOnInterruption()
throws InterruptedException
InterruptedExceptionpublic void testCheckedGetThrowsApplicationExceptionOnError()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||