vertx / io.vertx.reactivex.ext.unit / TestSuite

# TestSuite

`open class TestSuite`

A named suite of test cases that are executed altogether. The suite suite is created with the `io.vertx.reactivex.ext.unit.TestSuite#create` and the returned suite contains initially no tests. The suite can declare a callback before the suite with `io.vertx.reactivex.ext.unit.TestSuite#before` or after the suite with `io.vertx.reactivex.ext.unit.TestSuite#after`. The suite can declare a callback before each test with `io.vertx.reactivex.ext.unit.TestSuite#beforeEach` or after each test with `io.vertx.reactivex.ext.unit.TestSuite#afterEach`. Each test case of the suite is declared by calling the `io.vertx.reactivex.ext.unit.TestSuite#test` method. NOTE: This class has been automatically generated from the io.vertx.ext.unit.TestSuite non RX-ified interface using Vert.x codegen.

### Constructors

<init> | `TestSuite(delegate: TestSuite)`

### Properties

__TYPE_ARG | `static val __TYPE_ARG: TypeArg<TestSuite>`

### Functions

after | `open fun after(callback: Handler<TestContext>): TestSuite` Set a callback executed after the tests.
afterEach | `open fun afterEach(callback: Handler<TestContext>): TestSuite` Set a callback executed after each test and before the suite `after` callback.
before | `open fun before(callback: Handler<TestContext>): TestSuite` Set a callback executed before the tests.
beforeEach | `open fun beforeEach(callback: Handler<TestContext>): TestSuite` Set a callback executed before each test and after the suite `before` callback.
create | `open static fun create(name: String): TestSuite` Create and return a new test suite.
equals | `open fun equals(other: Any?): Boolean`
getDelegate | `open fun getDelegate(): TestSuite`
hashCode | `open fun hashCode(): Int`
newInstance | `open static fun newInstance(arg: TestSuite): TestSuite`
run | `open fun run(): TestCompletion` Run the testsuite with the default options. When the test suite is executed in a Vertx context (i.e `Vertx.currentContext()` returns a context) this context's event loop is used for running the test suite. Otherwise it is executed in the current thread. The returned io.vertx.reactivex.ext.unit.Completion object can be used to get a completion callback. `open fun run(options: TestOptions): TestCompletion` Run the testsuite with the specified `options`. When the test suite is executed in a Vertx context (i.e `Vertx.currentContext()` returns a context) this context's event loop is used for running the test suite unless the io.vertx.ext.unit.TestOptions is set to `false`. In this case it is executed by the current thread. Otherwise, the test suite will be executed in the current thread when io.vertx.ext.unit.TestOptions is set to `false` or `null`. If the value is `true`, this methods throws an `IllegalStateException`. The returned io.vertx.reactivex.ext.unit.Completion object can be used to get a completion callback. `open fun run(vertx: Vertx): TestCompletion` Run the testsuite with the default options and the specified `vertx` instance. The test suite will be executed on the event loop provided by the `vertx` argument. The returned io.vertx.reactivex.ext.unit.Completion object can be used to get a completion callback. `open fun run(vertx: Vertx, options: TestOptions): TestCompletion` Run the testsuite with the specified `options` and the specified `vertx` instance. The test suite will be executed on the event loop provided by the `vertx` argument when io.vertx.ext.unit.TestOptions is not set to `false`. The returned io.vertx.reactivex.ext.unit.Completion object can be used to get a completion callback.
test | `open fun test(name: String, testCase: Handler<TestContext>): TestSuite` `open fun test(name: String, repeat: Int, testCase: Handler<TestContext>): TestSuite` Add a new test case to the suite.
toString | `open fun toString(): String`