def resp_handler(resp): VertxAssert.assertTrue(200 == resp.status_code) # If we get here, the test is complete # You must always call `testComplete()` at the end. Remember that testing is *asynchronous* so # we cannot assume the test is complete by the time the test method has finished executing like # in standard synchronous tests VertxAssert.testComplete()
def test_something_else() : VertxAssert.testComplete()
def handler(msg): VertxAssert.assertEquals('pong!', msg.body) VertxAssert.testComplete()
def handler(timer_id): VertxAssert.assertNotNull(timer_id) VertxAssert.testComplete()
def test_foo(): VertxAssert.testComplete()
from org.vertx.testtools import VertxAssert import vertx_tests from core.event_bus import EventBus import vertx type = vertx.config()['type'] if type == 'fail': VertxAssert.fail('failed') elif type == 'assert_fail': VertxAssert.assertEquals('foo', 'bar') elif type == 'assert_ok': VertxAssert.assertEquals('foo', 'foo') VertxAssert.testComplete()
def test_assert_ok(): VertxAssert.assertEquals('foo', 'foo') VertxAssert.testComplete()
def handler(): VertxAssert.assertEquals("foo", "foo") VertxAssert.testComplete()
def test_1() : VertxAssert.testComplete()
def test_1(): VertxAssert.testComplete()