Search in sources :

Example 1 with AutoProvisionerConfigProperties

use of org.eclipse.hono.deviceregistry.service.device.AutoProvisionerConfigProperties in project hono by eclipse.

the class MongoDbBasedRegistrationServiceTest method startService.

/**
 * Starts up the service.
 *
 * @param testContext The test context to use for running asynchronous tests.
 */
@BeforeAll
public void startService(final VertxTestContext testContext) {
    vertx = Vertx.vertx();
    deviceDao = MongoDbTestUtils.getDeviceDao(vertx, DB_NAME);
    credentialsDao = MongoDbTestUtils.getCredentialsDao(vertx, DB_NAME);
    deviceManagementService = new MongoDbBasedDeviceManagementService(vertx, deviceDao, credentialsDao, config);
    final EdgeDeviceAutoProvisioner edgeDeviceAutoProvisioner = new EdgeDeviceAutoProvisioner(vertx, deviceManagementService, mockEventSenders(), new AutoProvisionerConfigProperties(), NoopTracerFactory.create());
    registrationService = new MongoDbBasedRegistrationService(deviceDao);
    registrationService.setEdgeDeviceAutoProvisioner(edgeDeviceAutoProvisioner);
    CompositeFuture.all(deviceDao.createIndices(), credentialsDao.createIndices()).onComplete(testContext.succeedingThenComplete());
}
Also used : EdgeDeviceAutoProvisioner(org.eclipse.hono.deviceregistry.service.device.EdgeDeviceAutoProvisioner) AutoProvisionerConfigProperties(org.eclipse.hono.deviceregistry.service.device.AutoProvisionerConfigProperties) BeforeAll(org.junit.jupiter.api.BeforeAll)

Aggregations

AutoProvisionerConfigProperties (org.eclipse.hono.deviceregistry.service.device.AutoProvisionerConfigProperties)1 EdgeDeviceAutoProvisioner (org.eclipse.hono.deviceregistry.service.device.EdgeDeviceAutoProvisioner)1 BeforeAll (org.junit.jupiter.api.BeforeAll)1