interface 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.
Author
Julien Viet
abstract fun assertEquals(expected: Any, actual: Any): TestContextabstract fun assertEquals(expected: Any, actual: Any, message: String): TestContext
Assert the |
|
abstract fun assertFalse(condition: Boolean): TestContextabstract fun assertFalse(condition: Boolean, message: String): TestContext
Assert the specified |
|
abstract fun assertInRange(expected: Double, actual: Double, delta: Double): TestContextabstract fun assertInRange(expected: Double, actual: Double, delta: Double, message: String): TestContext
Asserts that the |
|
abstract fun assertNotEquals(first: Any, second: Any): TestContextabstract fun assertNotEquals(first: Any, second: Any, message: String): TestContext
Assert the |
|
abstract fun assertNotNull(expected: Any): TestContextabstract fun assertNotNull(expected: Any, message: String): TestContext
Assert the |
|
abstract fun assertNull(expected: Any): TestContextabstract fun assertNull(expected: Any, message: String): TestContext
Assert the |
|
abstract fun assertTrue(condition: Boolean): TestContextabstract fun assertTrue(condition: Boolean, message: String): TestContext
Assert the specified |
|
abstract fun async(): Async
Create and returns a new async object, the returned async controls the completion of the test. Calling the abstract 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 |
|
abstract fun <T : Any> asyncAssertFailure(): Handler<AsyncResult<T>>abstract 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. |
|
abstract 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. abstract 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 |
|
abstract fun exceptionHandler(): Handler<Throwable> |
|
abstract fun fail(): Unit
Throw a failure. abstract fun fail(message: String): Unit
Throw a failure with the specified failure abstract fun fail(cause: Throwable): Unit
Throw a failure with the specified failure |
|
abstract fun <T : Any> get(key: String): T
Get some data from the context. |
|
abstract 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. |
|
abstract fun <T : Any> remove(key: String): T
Remove some data from the context. |