Search in sources :

Example 1 with IntegrationTestSupport

use of org.eclipse.hono.tests.IntegrationTestSupport in project hono by eclipse.

the class MqttTestBase method init.

/**
 * Sets up the helper.
 *
 * @param ctx The vert.x test context.
 */
@BeforeClass
public static void init(final TestContext ctx) {
    helper = new IntegrationTestSupport(VERTX);
    helper.init(ctx);
}
Also used : IntegrationTestSupport(org.eclipse.hono.tests.IntegrationTestSupport) BeforeClass(org.junit.BeforeClass)

Example 2 with IntegrationTestSupport

use of org.eclipse.hono.tests.IntegrationTestSupport in project hono by eclipse.

the class CoapTestBase method setUp.

/**
 * Sets up the fixture.
 *
 * @param testInfo The test meta data.
 * @param ctx The vert.x test context.
 * @throws UnknownHostException if the CoAP adapter's host name cannot be resolved.
 */
@BeforeEach
public void setUp(final TestInfo testInfo, final VertxTestContext ctx) throws UnknownHostException {
    logger.info("running {}", testInfo.getDisplayName());
    helper = new IntegrationTestSupport(vertx);
    logger.info("using CoAP adapter [host: {}, coap port: {}, coaps port: {}]", IntegrationTestSupport.COAP_HOST, IntegrationTestSupport.COAP_PORT, IntegrationTestSupport.COAPS_PORT);
    coapAdapterSecureAddress = new InetSocketAddress(Inet4Address.getByName(IntegrationTestSupport.COAP_HOST), IntegrationTestSupport.COAPS_PORT);
    tenantId = helper.getRandomTenantId();
    deviceId = helper.getRandomDeviceId(tenantId);
    helper.init().onComplete(ctx.succeedingThenComplete());
}
Also used : InetSocketAddress(java.net.InetSocketAddress) IntegrationTestSupport(org.eclipse.hono.tests.IntegrationTestSupport) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 3 with IntegrationTestSupport

use of org.eclipse.hono.tests.IntegrationTestSupport in project hono by eclipse.

the class AmqpAdapterTestBase method setUp.

/**
 * Create a HTTP client for accessing the device registry (for registering devices and credentials) and
 * an AMQP 1.0 client for consuming messages from the messaging network.
 *
 * @param testInfo Meta info about the test being run.
 * @param ctx The Vert.x test context.
 */
@BeforeEach
public void setUp(final TestInfo testInfo, final VertxTestContext ctx) {
    log.info("running {}", testInfo.getDisplayName());
    helper = new IntegrationTestSupport(vertx);
    helper.init().onComplete(ctx.succeedingThenComplete());
}
Also used : IntegrationTestSupport(org.eclipse.hono.tests.IntegrationTestSupport) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 4 with IntegrationTestSupport

use of org.eclipse.hono.tests.IntegrationTestSupport in project hono by eclipse.

the class TelemetryJmsQoS1IT method setUp.

/**
 * Creates a connection to the AMP Messaging Network.
 * Prints the test name to the console.
 *
 * @param info The current test's meta information.
 * @param ctx The vert.x test context.
 */
@BeforeEach
public void setUp(final TestInfo info, final VertxTestContext ctx) {
    LOG.info("running {}", info.getDisplayName());
    helper = new IntegrationTestSupport(vertx);
    helper.initRegistryClient();
    amqpMessagingNetwork = JmsBasedHonoConnection.newConnection(IntegrationTestSupport.getMessagingNetworkProperties());
    amqpMessagingNetwork.connect().onComplete(ctx.succeedingThenComplete());
}
Also used : IntegrationTestSupport(org.eclipse.hono.tests.IntegrationTestSupport) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 5 with IntegrationTestSupport

use of org.eclipse.hono.tests.IntegrationTestSupport in project hono by eclipse.

the class DeviceRegistryNotificationsIT method setUp.

/**
 * Creates a HTTP client for accessing the device registry (for registering tenants and devices).
 *
 * @param ctx The Vert.x test context.
 */
@BeforeEach
public void setUp(final VertxTestContext ctx) {
    helper = new IntegrationTestSupport(vertx);
    helper.init().onComplete(ctx.succeedingThenComplete());
}
Also used : IntegrationTestSupport(org.eclipse.hono.tests.IntegrationTestSupport) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

IntegrationTestSupport (org.eclipse.hono.tests.IntegrationTestSupport)9 BeforeEach (org.junit.jupiter.api.BeforeEach)7 CrudHttpClient (org.eclipse.hono.tests.CrudHttpClient)2 BeforeClass (org.junit.BeforeClass)2 HttpClientOptions (io.vertx.core.http.HttpClientOptions)1 InetSocketAddress (java.net.InetSocketAddress)1