|
|
@ -18,6 +18,7 @@ package org.thingsboard.server.dao.service; |
|
|
import com.datastax.oss.driver.api.core.uuid.Uuids; |
|
|
import com.datastax.oss.driver.api.core.uuid.Uuids; |
|
|
import com.fasterxml.jackson.databind.JsonNode; |
|
|
import com.fasterxml.jackson.databind.JsonNode; |
|
|
import com.fasterxml.jackson.databind.ObjectMapper; |
|
|
import com.fasterxml.jackson.databind.ObjectMapper; |
|
|
|
|
|
import org.apache.commons.lang3.RandomStringUtils; |
|
|
import org.junit.runner.RunWith; |
|
|
import org.junit.runner.RunWith; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.context.annotation.Bean; |
|
|
import org.springframework.context.annotation.Bean; |
|
|
@ -36,6 +37,7 @@ import org.thingsboard.server.common.data.Tenant; |
|
|
import org.thingsboard.server.common.data.device.profile.DefaultDeviceProfileConfiguration; |
|
|
import org.thingsboard.server.common.data.device.profile.DefaultDeviceProfileConfiguration; |
|
|
import org.thingsboard.server.common.data.device.profile.DefaultDeviceProfileTransportConfiguration; |
|
|
import org.thingsboard.server.common.data.device.profile.DefaultDeviceProfileTransportConfiguration; |
|
|
import org.thingsboard.server.common.data.device.profile.DeviceProfileData; |
|
|
import org.thingsboard.server.common.data.device.profile.DeviceProfileData; |
|
|
|
|
|
import org.thingsboard.server.common.data.edge.Edge; |
|
|
import org.thingsboard.server.common.data.id.EntityId; |
|
|
import org.thingsboard.server.common.data.id.EntityId; |
|
|
import org.thingsboard.server.common.data.id.HasId; |
|
|
import org.thingsboard.server.common.data.id.HasId; |
|
|
import org.thingsboard.server.common.data.id.TenantId; |
|
|
import org.thingsboard.server.common.data.id.TenantId; |
|
|
@ -241,4 +243,15 @@ public abstract class AbstractServiceTest { |
|
|
return savedTenant.getId(); |
|
|
return savedTenant.getId(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected Edge constructEdge(TenantId tenantId, String name, String type) { |
|
|
|
|
|
Edge edge = new Edge(); |
|
|
|
|
|
edge.setTenantId(tenantId); |
|
|
|
|
|
edge.setName(name); |
|
|
|
|
|
edge.setType(type); |
|
|
|
|
|
edge.setSecret(RandomStringUtils.randomAlphanumeric(20)); |
|
|
|
|
|
edge.setRoutingKey(RandomStringUtils.randomAlphanumeric(20)); |
|
|
|
|
|
edge.setEdgeLicenseKey(RandomStringUtils.randomAlphanumeric(20)); |
|
|
|
|
|
edge.setCloudEndpoint("http://localhost:8080"); |
|
|
|
|
|
return edge; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|