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.
Author
Julien Viet
abstract fun after(callback: Handler<TestContext>): TestSuite
Set a callback executed after the tests. |
|
abstract fun afterEach(callback: Handler<TestContext>): TestSuite
Set a callback executed after each test and before the suite |
|
abstract fun before(callback: Handler<TestContext>): TestSuite
Set a callback executed before the tests. |
|
abstract fun beforeEach(callback: Handler<TestContext>): TestSuite
Set a callback executed before each test and after the suite |
|
open static fun create(name: String): TestSuite
Create and return a new test suite. open static fun create(testSuiteObject: Any): TestSuite
Create and return a new test suite configured after the
|
|
abstract 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 Completion object can be used to get a completion callback. abstract fun run(options: TestOptions): TestCompletion
Run the testsuite with the specified abstract fun run(vertx: Vertx): TestCompletion
Run the testsuite with the default options and the specified abstract fun run(vertx: Vertx, options: TestOptions): TestCompletion
Run the testsuite with the specified |
|
abstract fun test(name: String, testCase: Handler<TestContext>): TestSuiteabstract fun test(name: String, repeat: Int, testCase: Handler<TestContext>): TestSuite
Add a new test case to the suite. |