Constructor and Description |
---|
MockFutureListener(com.google.common.util.concurrent.ListenableFuture<?> future) |
Modifier and Type | Method and Description |
---|---|
void |
assertException(Throwable expectedCause)
Verify that the listener completes in a reasonable amount of time, and
Asserts that the future throws an
ExecutableException and that the
cause of the ExecutableException is expectedCause . |
void |
assertSuccess(Object expectedData)
Verify that the listener completes in a reasonable amount of time, and
Asserts that the future returns the expected data.
|
void |
assertTimeout() |
void |
run() |
public MockFutureListener(com.google.common.util.concurrent.ListenableFuture<?> future)
public void assertSuccess(Object expectedData) throws Throwable
Throwable
- if the listener isn't called or if it resulted in a
throwable or if the result doesn't match the expected value.public void assertException(Throwable expectedCause) throws Exception
ExecutableException
and that the
cause of the ExecutableException
is expectedCause
.Exception
Copyright © 2010-2016. All Rights Reserved.