vertx / io.vertx.ext.unit.junit

Package io.vertx.ext.unit.junit

Types

RepeatRule

open class RepeatRule : TestRule

RunTestOnContext

open class RunTestOnContext : TestRule

A JUnit rule that runs tests on a Vert.x context. When used as a 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.

Timeout

open class Timeout : TestRule

A rule for configuring the tests timeout.

VertxUnitRunner

open class VertxUnitRunner : BlockJUnit4ClassRunner

A JUnit runner for writing asynchronous tests. Note : a runner is needed because when a rule statement is evaluated, it will run the before/test/after method and then test method is executed even if there are pending Async objects in the before method. The runner gives this necessary fine grained control.

VertxUnitRunnerWithParameters

open class VertxUnitRunnerWithParameters : VertxUnitRunner

VertxUnitRunnerWithParametersFactory

open class VertxUnitRunnerWithParametersFactory : ParametersRunnerFactory

A org.junit.runners.parameterized.ParametersRunnerFactory for a io.vertx.ext.unit.junit.VertxUnitRunner for enabling Vert.x Unit parameterized tests.

Annotations

Repeat

class Repeat

Annotates a test method to repeat this test several times. This can be useful when a test fails randomly and not often.