Package io.vertx.ext.unit
Interface TestCase
-
public interface TestCase
A test case object can be used to create a single test.- Author:
- Julien Viet
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description void
awaitSuccess()
Assert the test case passes and block until it is executed.void
awaitSuccess(long timeout, TimeUnit unit)
Assert the test case passes and block until it is executed.void
awaitSuccess(Vertx vertx)
Assert the test case passes and block until it is executed.void
awaitSuccess(Vertx vertx, long timeout, TimeUnit unit)
Assert the test case passes and block until it is executed.static TestCase
create(String name, Handler<TestContext> testCase)
Create a test case.
-
-
-
Method Detail
-
create
static TestCase create(String name, Handler<TestContext> testCase)
Create a test case.- Parameters:
name
- the test case nametestCase
- the test case- Returns:
- the created test case
-
awaitSuccess
void awaitSuccess()
Assert the test case passes and block until it is executed. This method should be used from a non Vert.x context, like a Junit test.
-
awaitSuccess
void awaitSuccess(long timeout, TimeUnit unit)
Assert the test case passes and block until it is executed. This method should be used from a non Vert.x context, like a Junit test.- Parameters:
timeout
- the suite timeout expressed in theunit
argumentunit
- the suitetimeout
unit
-
awaitSuccess
void awaitSuccess(Vertx vertx)
Assert the test case passes and block until it is executed. This method should be used from a non Vert.x context, like a Junit test.- Parameters:
vertx
- the vert.x instance
-
awaitSuccess
void awaitSuccess(Vertx vertx, long timeout, TimeUnit unit)
Assert the test case passes and block until it is executed. This method should be used from a non Vert.x- Parameters:
vertx
- the vert.x instancetimeout
- the suite timeout expressed in theunit
argumentunit
- the suitetimeout
unit
-
-