Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
async bdd unit runner
class MyAsyncSpec {
void asyncTestRequest(TestContext context) {
// startsWith async => creates context.async()
def client
setup {
client = vertx.createHttpClient(...)
when {
then { response -> // automatically registers the then(Closure closure) as a handler of the object returned by when {}
context.assertEquals(response.statusCode(), 200)
// evaluate all the conditions, if nothing is thrown then async.complete()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.