adapter = newProtocolAdapter(properties); adapter.setTenantServiceClient(tenantService); adapter.setRegistrationServiceClient(registrationService); adapter.setCredentialsServiceClient(credentialsService); adapter.setHonoMessagingClient(messagingService);
/** * Verifies that an adapter that does not define a type name * cannot be started. * * @param ctx The vert.x test context. */ @Test public void testStartInternalFailsIfNoTypeNameIsDefined(final TestContext ctx) { // GIVEN an adapter that does not define a type name adapter = newProtocolAdapter(properties, null); adapter.setRegistrationServiceClient(mock(HonoClient.class)); // WHEN starting the adapter // THEN startup fails adapter.startInternal().setHandler(ctx.asyncAssertFailure()); }
private void givenAnAdapterConfiguredWithServiceClients( final Handler<Void> startupHandler, final Handler<Void> commandConnectionEstablishedHandler, final Handler<Void> commandConnectionLostHandler) { adapter = newProtocolAdapter(properties, "test", startupHandler, commandConnectionEstablishedHandler, commandConnectionLostHandler); adapter.setCredentialsServiceClient(credentialsService); adapter.setHonoMessagingClient(messagingService); adapter.setRegistrationServiceClient(registrationService); adapter.setTenantServiceClient(tenantService); adapter.setCommandConnection(commandConnection); }