io.vertx.reactivex.ext.unit

## Class TestSuite

- java.lang.Object
- - io.vertx.reactivex.ext.unit.TestSuite

-     public class TestSuite
      extends Object

  A named suite of test cases that are executed altogether. The suite suite is created with the `create(java.lang.String)` and the returned suite contains initially no tests.

  The suite can declare a callback before the suite with `before(io.vertx.core.Handler<io.vertx.reactivex.ext.unit.TestContext>)` or after the suite with `after(io.vertx.core.Handler<io.vertx.reactivex.ext.unit.TestContext>)`.

  The suite can declare a callback before each test with `beforeEach(io.vertx.core.Handler<io.vertx.reactivex.ext.unit.TestContext>)` or after each test with `afterEach(io.vertx.core.Handler<io.vertx.reactivex.ext.unit.TestContext>)`.

  Each test case of the suite is declared by calling the `test(java.lang.String, io.vertx.core.Handler<io.vertx.reactivex.ext.unit.TestContext>)` method.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<TestSuite>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TestSuite(Object delegate)`
    `TestSuite(TestSuite delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `TestSuite` | `after(Handler<TestContext> callback)` Set a callback executed after the tests.
    `TestSuite` | `afterEach(Handler<TestContext> callback)` Set a callback executed after each test and before the suite `after` callback.
    `TestSuite` | `before(Handler<TestContext> callback)` Set a callback executed before the tests.
    `TestSuite` | `beforeEach(Handler<TestContext> callback)` Set a callback executed before each test and after the suite `before` callback.
    `static TestSuite` | `create(String name)` Create and return a new test suite.
    `boolean` | `equals(Object o)`
    `TestSuite` | `getDelegate()`
    `int` | `hashCode()`
    `static TestSuite` | `newInstance(TestSuite arg)`
    `TestCompletion` | `run()` 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.
    `TestCompletion` | `run(TestOptions options)` 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 `TestOptions` is set to `false`.
    `TestCompletion` | `run(Vertx vertx)` 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.
    `TestCompletion` | `run(Vertx vertx, TestOptions options)` 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 `TestOptions` is not set to `false`.
    `TestSuite` | `test(String name, Handler<TestContext> testCase)` Add a new test case to the suite.
    `TestSuite` | `test(String name, int repeat, Handler<TestContext> testCase)` Add a new test case to the suite.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<TestSuite> __TYPE_ARG

  - ### Constructor Detail

    - #### TestSuite

          public TestSuite(TestSuite delegate)

    - #### TestSuite

          public TestSuite(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public TestSuite getDelegate()

    - #### create

          public static TestSuite create(String name)

      Create and return a new test suite.
      Parameters:
        `name` - the test suite name
      Returns:
        the created test suite

    - #### before

          public TestSuite before(Handler<TestContext> callback)

      Set a callback executed before the tests.
      Parameters:
        `callback` - the callback
      Returns:
        a reference to this, so the API can be used fluently

    - #### beforeEach

          public TestSuite beforeEach(Handler<TestContext> callback)

      Set a callback executed before each test and after the suite `before` callback.
      Parameters:
        `callback` - the callback
      Returns:
        a reference to this, so the API can be used fluently

    - #### after

          public TestSuite after(Handler<TestContext> callback)

      Set a callback executed after the tests.
      Parameters:
        `callback` - the callback
      Returns:
        a reference to this, so the API can be used fluently

    - #### afterEach

          public TestSuite afterEach(Handler<TestContext> callback)

      Set a callback executed after each test and before the suite `after` callback.
      Parameters:
        `callback` - the callback
      Returns:
        a reference to this, so the API can be used fluently

    - #### test

          public TestSuite test(String name,
                                Handler<TestContext> testCase)

      Add a new test case to the suite.
      Parameters:
        `name` - the test case name
        `testCase` - the test case
      Returns:
        a reference to this, so the API can be used fluently

    - #### test

          public TestSuite test(String name,
                                int repeat,
                                Handler<TestContext> testCase)

      Add a new test case to the suite.
      Parameters:
        `name` - the test case name
        `repeat` - the number of times the test should be repeated
        `testCase` - the test case
      Returns:
        a reference to this, so the API can be used fluently

    - #### run

          public TestCompletion run()

      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 `Completion` object can be used to get a completion callback.
      Returns:
        the related test completion

    - #### run

          public TestCompletion run(TestOptions options)

      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 `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 `TestOptions` is set to `false` or `null`. If the value is `true`, this methods throws an `IllegalStateException`.

      The returned `Completion` object can be used to get a completion callback.
      Parameters:
        `options` - the test options
      Returns:
        the related test completion

    - #### run

          public TestCompletion run(Vertx vertx)

      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 `Completion` object can be used to get a completion callback.

      Parameters:
        `vertx` - the vertx instance
      Returns:
        the related test completion

    - #### run

          public TestCompletion run(Vertx vertx,
                                    TestOptions options)

      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 `TestOptions` is not set to `false`. The returned `Completion` object can be used to get a completion callback.
      Parameters:
        `vertx` - the vertx instance
        `options` - the test options
      Returns:
        the related test completion

    - #### newInstance

          public static TestSuite newInstance(TestSuite arg)

Copyright © 2022 Eclipse. All rights reserved.