use of io.vertx.ext.unit.TestCompletion in project apiman by apiman.
the class LdapQueryTests method shouldConnectSuccessfully.
@Test
public void shouldConnectSuccessfully() {
config.setBindDn("uid=admin,ou=system");
config.setBindPassword("secret");
TestCompletion completion = TestSuite.create("").test("", context -> {
Async async = context.async();
ldapClientComponent.connect(config, connectionResult -> {
context.assertTrue(connectionResult.isSuccess());
connection = connectionResult.getResult();
async.complete();
});
async.awaitSuccess();
}).run();
completion.awaitSuccess();
}
Aggregations