public class TestSuiteImpl extends Object implements TestSuite
| Constructor and Description |
|---|
TestSuiteImpl(Object testSuiteObject) |
TestSuiteImpl(String name) |
| Modifier and Type | Method and Description |
|---|---|
TestSuite |
after(Handler<TestContext> handler)
Set a callback executed after the tests.
|
TestSuite |
afterEach(Handler<TestContext> handler)
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. |
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.setUseEventLoop(Boolean)
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.setUseEventLoop(Boolean) is not set to false. |
TestSuiteRunner |
runner() |
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.
|
List<TestCaseImpl> |
testCases() |
public TestSuiteImpl(String name)
public TestSuiteImpl(Object testSuiteObject)
public List<TestCaseImpl> testCases()
public TestSuite before(Handler<TestContext> callback)
TestSuitepublic TestSuite beforeEach(Handler<TestContext> callback)
TestSuitebefore callback.beforeEach in interface TestSuitecallback - the callbackpublic TestSuite after(Handler<TestContext> handler)
TestSuitepublic TestSuite afterEach(Handler<TestContext> handler)
TestSuiteafter callback.public TestSuite test(String name, Handler<TestContext> testCase)
TestSuitepublic TestSuite test(String name, int repeat, Handler<TestContext> testCase)
TestSuitepublic TestCompletion run()
TestSuiteCompletion object can be used to get a completion callback.public TestCompletion run(Vertx vertx)
TestSuitevertx 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.public TestCompletion run(TestOptions options)
TestSuiteoptions.
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.setUseEventLoop(Boolean)
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.setUseEventLoop(Boolean) 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.public TestCompletion run(Vertx vertx, TestOptions options)
TestSuiteoptions and the specified vertx instance.
The test suite will be executed on the event loop provided by the vertx argument when
TestOptions.setUseEventLoop(Boolean) is not set to false. The returned
Completion object can be used to get a completion callback.public TestSuiteRunner runner()
Copyright © 2020. All rights reserved.