vertx / io.vertx.ext.unit

Package io.vertx.ext.unit

Types

Async

interface Async : Completion<Void>

An asynchronous exit point for a test.

Completion

interface Completion<T : Any>

A completion object that emits completion notifications either succeeded or failed.

TestCase

interface TestCase

A test case object can be used to create a single test.

TestCompletion

interface TestCompletion : Completion<Void>

This object provides callback-ability for the end of a test suite, the completion succeeds when all tests pass otherwise it fails.

TestContext

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.

TestOptions

open class TestOptions : ReportingOptions

Test execution options:

  • the timeout in milliseconds, the default value is 2 minutes
  • the useEventLoop
  • configures the event loop usage
    • true always runs with an event loop
    • false never runs with an event loop
    • null uses an event loop if there is one (provided by io.vertx.core.Vertx#currentContext()) otherwise run without
  • the reporters is an array of reporter configurations

TestOptionsConverter

open class TestOptionsConverter

Converter for io.vertx.ext.unit.TestOptions. NOTE: This class has been automatically generated from the io.vertx.ext.unit.TestOptions original class using Vert.x codegen.

TestSuite

interface TestSuite

A named suite of test cases that are executed altogether. The suite suite is created with the #create(String) and the returned suite contains initially no tests. The suite can declare a callback before the suite with #before(io.vertx.core.Handler) or after the suite with #after(io.vertx.core.Handler). The suite can declare a callback before each test with #beforeEach(io.vertx.core.Handler) or after each test with #afterEach(io.vertx.core.Handler). Each test case of the suite is declared by calling the #test(String, io.vertx.core.Handler) method.