Class TestSuite
java.lang.Object
io.vertx.rxjava3.ext.unit.TestSuite
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
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(Handler) or after
the suite with after(Handler).
The suite can declare a callback before each test with beforeEach(Handler) or after
each test with afterEach(Handler).
Each test case of the suite is declared by calling the test(String, Handler) method.
NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionafter(Handler<TestContext> callback) Set a callback executed after the tests.afterEach(Handler<TestContext> callback) Set a callback executed after each test and before the suiteaftercallback.before(Handler<TestContext> callback) Set a callback executed before the tests.beforeEach(Handler<TestContext> callback) Set a callback executed before each test and after the suitebeforecallback.static TestSuiteCreate and return a new test suite.booleaninthashCode()static TestSuitenewInstance(TestSuite arg) run()Run the testsuite with the default options.run(TestOptions options) Run the testsuite with the specifiedoptions.Run the testsuite with the default options and the specifiedvertxinstance.run(Vertx vertx, TestOptions options) Run the testsuite with the specifiedoptionsand the specifiedvertxinstance.test(String name, int repeat, Handler<TestContext> testCase) Add a new test case to the suite.test(String name, Handler<TestContext> testCase) Add a new test case to the suite.toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
TestSuite
-
TestSuite
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
create
-
before
Set a callback executed before the tests.- Parameters:
callback- the callback- Returns:
- a reference to this, so the API can be used fluently
-
beforeEach
Set a callback executed before each test and after the suitebeforecallback.- Parameters:
callback- the callback- Returns:
- a reference to this, so the API can be used fluently
-
after
Set a callback executed after the tests.- Parameters:
callback- the callback- Returns:
- a reference to this, so the API can be used fluently
-
afterEach
Set a callback executed after each test and before the suiteaftercallback.- Parameters:
callback- the callback- Returns:
- a reference to this, so the API can be used fluently
-
test
Add a new test case to the suite.- Parameters:
name- the test case nametestCase- the test case- Returns:
- a reference to this, so the API can be used fluently
-
test
Add a new test case to the suite.- Parameters:
name- the test case namerepeat- the number of times the test should be repeatedtestCase- the test case- Returns:
- a reference to this, so the API can be used fluently
-
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 returnedCompletionobject can be used to get a completion callback.- Returns:
- the related test completion
-
run
Run the testsuite with the specifiedoptions. 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 theTestOptionsis set tofalse. In this case it is executed by the current thread. Otherwise, the test suite will be executed in the current thread whenTestOptionsis set tofalseornull. If the value istrue, this methods throws anIllegalStateException. The returnedCompletionobject can be used to get a completion callback.- Parameters:
options- the test options- Returns:
- the related test completion
-
run
Run the testsuite with the default options and the specifiedvertxinstance. The test suite will be executed on the event loop provided by thevertxargument. The returnedCompletionobject can be used to get a completion callback.- Parameters:
vertx- the vertx instance- Returns:
- the related test completion
-
run
Run the testsuite with the specifiedoptionsand the specifiedvertxinstance. The test suite will be executed on the event loop provided by thevertxargument whenTestOptionsis not set tofalse. The returnedCompletionobject can be used to get a completion callback.- Parameters:
vertx- the vertx instanceoptions- the test options- Returns:
- the related test completion
-
newInstance
-