open class TestContext
The test context is used for performing test assertions and manage the completion of the test. This context is provided by vertx-unit as argument of the test case. NOTE: This class has been automatically generated from the io.vertx.ext.unit.TestContext non RX-ified interface using Vert.x codegen.
TestContext(delegate: TestContext) |
static val __TYPE_ARG: TypeArg<TestContext> |
open fun assertEquals(expected: Any, actual: Any): TestContextopen fun assertEquals(expected: Any, actual: Any, message: String): TestContext
Assert the |
|
open fun assertFalse(condition: Boolean): TestContextopen fun assertFalse(condition: Boolean, message: String): TestContext
Assert the specified |
|
open fun assertInRange(expected: Double, actual: Double, delta: Double): TestContextopen fun assertInRange(expected: Double, actual: Double, delta: Double, message: String): TestContext
Asserts that the |
|
open fun assertNotEquals(first: Any, second: Any): TestContextopen fun assertNotEquals(first: Any, second: Any, message: String): TestContext
Assert the |
|
open fun assertNotNull(expected: Any): TestContextopen fun assertNotNull(expected: Any, message: String): TestContext
Assert the |
|
open fun assertNull(expected: Any): TestContextopen fun assertNull(expected: Any, message: String): TestContext
Assert the |
|
open fun assertTrue(condition: Boolean): TestContextopen fun assertTrue(condition: Boolean, message: String): TestContext
Assert the specified |
|
open fun async(): Async
Create and returns a new async object, the returned async controls the completion of the test. Calling the open fun async(count: Int): Async
Create and returns a new async object, the returned async controls the completion of the test. This async operation completes when the |
|
open fun <T : Any> asyncAssertFailure(): Handler<AsyncResult<T>>open fun <T : Any> asyncAssertFailure(causeHandler: Handler<Throwable>): Handler<AsyncResult<T>>
Creates and returns a new async handler, the returned handler controls the completion of the test. When the returned handler is called back with a failed result it completes the async operation. When the returned handler is called back with a succeeded result it fails the test. |
|
open fun <T : Any> asyncAssertSuccess(): Handler<AsyncResult<T>>
Creates and returns a new async handler, the returned handler controls the completion of the test. When the returned handler is called back with a succeeded result it completes the async operation. When the returned handler is called back with a failed result it fails the test with the cause of the failure. open fun <T : Any> asyncAssertSuccess(resultHandler: Handler<T>): Handler<AsyncResult<T>>
Creates and returns a new async handler, the returned handler controls the completion of the test. When the returned handler is called back with a succeeded result it invokes the |
|
open fun equals(other: Any?): Boolean |
|
open fun exceptionHandler(): Handler<Throwable> |
|
open fun fail(): Unit
Throw a failure. open fun fail(message: String): Unit
Throw a failure with the specified failure open fun fail(cause: Throwable): Unit
Throw a failure with the specified failure |
|
open fun <T : Any> get(key: String): T
Get some data from the context. |
|
open fun getDelegate(): TestContext |
|
open fun hashCode(): Int |
|
open static fun newInstance(arg: TestContext): TestContext |
|
open fun <T : Any> put(key: String, value: Any): T
Put some data in the context. This can be used to share data between different tests and before/after phases. |
|
open fun <T : Any> remove(key: String): T
Remove some data from the context. |
|
open fun strictAsync(count: Int): Async
Create and returns a new async object, the returned async controls the completion of the test. This async operation completes when the |
|
open fun toString(): String |
|
open fun verify(block: Handler<Void>): TestContext
Execute the provided handler, which may contain assertions, possibly from any third-party assertion framework. Any java.lang.AssertionError thrown will be caught (and propagated) in order to fulfill potential expected async completeness. |