public class RunTestOnContext extends Object
org.junit.Rule a new context is created for each tested method, the context will be same
for the before and after method, but different for all the tested methods.
When used as a org.junit.ClassRule, a single context is created for all the tested method, the beforeClass
and afterClass method will also executed in this context.| Constructor and Description |
|---|
RunTestOnContext()
Create a new rule managing a Vertx instance created with default options.
|
RunTestOnContext(java.util.function.Supplier<Vertx> createVertx,
java.util.function.BiConsumer<Vertx,CountDownLatch> closeVertx)
Create a new rule with supplier/consumer for creating/closing a Vert.x instance.
|
RunTestOnContext(VertxOptions options)
Create a new rule managing a Vertx instance created with specified options.
|
| Modifier and Type | Method and Description |
|---|---|
Statement |
apply(Statement base,
Description description) |
Vertx |
vertx()
Retrieves the current Vert.x instance, this value varies according to the test life cycle.
|
public RunTestOnContext()
public RunTestOnContext(VertxOptions options)
options - the vertx optionspublic RunTestOnContext(java.util.function.Supplier<Vertx> createVertx, java.util.function.BiConsumer<Vertx,CountDownLatch> closeVertx)
createVertx - the create Vert.x suppliercloseVertx - the close Vert.x consumerpublic Vertx vertx()
public Statement apply(Statement base,
Description description)
Copyright © 2015. All Rights Reserved.