Package io.vertx.ext.unit
Interface TestCase
-
public interface TestCaseA 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 voidawaitSuccess()Assert the test case passes and block until it is executed.voidawaitSuccess(long timeout, TimeUnit unit)Assert the test case passes and block until it is executed.voidawaitSuccess(Vertx vertx)Assert the test case passes and block until it is executed.voidawaitSuccess(Vertx vertx, long timeout, TimeUnit unit)Assert the test case passes and block until it is executed.static TestCasecreate(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 theunitargumentunit- the suitetimeoutunit
-
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 theunitargumentunit- the suitetimeoutunit
-
-