class VertxTestContext
A test context to wait on the outcomes of asynchronous operations.
Author
Julien Ponge
VertxTestContext()
A test context to wait on the outcomes of asynchronous operations. |
fun awaitCompletion(timeout: Long, unit: TimeUnit): Boolean
Wait for the completion of the test context. This method is automatically called by the VertxExtension when using parameter injection of VertxTestContext. You should only call it when you instantiate this class manually. |
|
fun causeOfFailure(): Throwable
Give the cause of failure. |
|
fun checkpoint(): Checkpointfun checkpoint(requiredNumberOfPasses: Int): Checkpoint
Create a checkpoint. |
|
fun completeNow(): Unit
Complete the test context immediately, making the corresponding test pass. |
|
fun completed(): Boolean
Check if the context has completed. |
|
fun failNow(t: Throwable): Unit
Make the test context fail immediately, making the corresponding test fail. |
|
fun failed(): Boolean
Check if the context has been marked has failed or not. |
|
fun <T : Any> failing(): Handler<AsyncResult<T>>
Create an asynchronous result handler that expects a failure. fun <T : Any> failing(nextHandler: Handler<Throwable>): Handler<AsyncResult<T>>
Create an asynchronous result handler that expects a failure, and passes the exception to another handler. |
|
fun strictCheckpoint(): Checkpointfun strictCheckpoint(requiredNumberOfPasses: Int): Checkpoint
Create a strict checkpoint. |
|
fun <T : Any> succeeding(): Handler<AsyncResult<T>>
Create an asynchronous result handler that expects a success. fun <T : Any> succeeding(nextHandler: Handler<T>): Handler<AsyncResult<T>>
Create an asynchronous result handler that expects a success, and passes the value to another handler. |
|
fun verify(block: Runnable): VertxTestContext
Allow verifications and assertions to be made. This method allows any assertion API to be used. The semantic is that the verification is successful when no exception is being thrown upon calling |