예제 #1
0
 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 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 listen_handler(err, server):
     VertxAssert.assertNull(err)
     # The server is listening so send an HTTP request
     vertx.create_http_client().set_port(8181).get_now("/", resp_handler)
예제 #4
0
 def handler(timer_id):
     VertxAssert.assertNotNull(timer_id)
     VertxAssert.testComplete()
예제 #5
0
 def listen_handler(err, server):
     VertxAssert.assertNull(err)
     # The server is listening so send an HTTP request
     vertx.create_http_client().set_port(8181).get_now("/", resp_handler)
예제 #6
0
def test_something_else() :
    VertxAssert.testComplete()
예제 #7
0
import vertx
from org.vertx.testtools import VertxAssert
from org.vertx.java.platform.impl import JythonVerticleFactory

VertxAssert.initialize(JythonVerticleFactory.vertx)

def start_tests(locs) :
    method_name = vertx.config()['methodName']
    locs[method_name]()
def test_fail_direct():
    VertxAssert.fail("failed")
def test_assert_failed_direct():
    VertxAssert.assertEquals("foo", "bar")
 def handler():
     VertxAssert.fail("failed")
 def handler():
     VertxAssert.assertEquals("foo", "bar")
def test_assert_ok():
    VertxAssert.assertEquals('foo', 'foo')
    VertxAssert.testComplete()
 def handler():
     VertxAssert.assertEquals("foo", "foo")
     VertxAssert.testComplete()
예제 #14
0
def test_1() :
    VertxAssert.testComplete()
 def handler(timer_id):
     VertxAssert.assertNotNull(timer_id)
     VertxAssert.testComplete()
예제 #16
0
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()


예제 #17
0
 def handler(msg):
     VertxAssert.assertEquals('pong!', msg.body)
     VertxAssert.testComplete()
def test_foo():
    VertxAssert.testComplete()
예제 #19
0
def handler(err, depID):
    # Deployment is asynchronous and this this handler will be called when it's complete (or failed)
    VertxAssert.assertNull(err)
    # If deployed correctly then start the tests!
    vertx_tests.start_tests(script)
예제 #20
0
def test_1():
    VertxAssert.testComplete()