suman icon indicating copy to clipboard operation
suman copied to clipboard

using java junit style async cb

Open ORESoftware opened this issue 6 years ago • 0 comments

  @Test
  public void testThatTheServerIsStarted(TestContext tc) {
    Async async = tc.async();
    vertx.createHttpClient().getNow(8080, "localhost", "/", response -> {
      tc.assertEquals(response.statusCode(), 200);
      response.bodyHandler(body -> {
        tc.assertTrue(body.length() > 0);
        async.complete();
      });
    });
  }

ORESoftware avatar Dec 20 '18 10:12 ORESoftware