Search in sources :

Example 1 with AttributesEntityView

use of org.thingsboard.server.common.data.objects.AttributesEntityView in project thingsboard by thingsboard.

the class BaseEntityViewControllerTest method beforeTest.

@Before
public void beforeTest() throws Exception {
    loginSysAdmin();
    idComparator = new IdComparator<>();
    savedTenant = doPost("/api/tenant", getNewTenant("My tenant"), Tenant.class);
    Assert.assertNotNull(savedTenant);
    tenantAdmin = new User();
    tenantAdmin.setAuthority(Authority.TENANT_ADMIN);
    tenantAdmin.setTenantId(savedTenant.getId());
    tenantAdmin.setEmail("tenant2@thingsboard.org");
    tenantAdmin.setFirstName("Joe");
    tenantAdmin.setLastName("Downs");
    tenantAdmin = createUserAndLogin(tenantAdmin, "testPassword1");
    Device device = new Device();
    device.setName("Test device");
    device.setType("default");
    testDevice = doPost("/api/device", device, Device.class);
    telemetry = new TelemetryEntityView(Arrays.asList("tsKey1", "tsKey2", "tsKey3"), new AttributesEntityView(Arrays.asList("caKey1", "caKey2", "caKey3", "caKey4"), Arrays.asList("saKey1", "saKey2", "saKey3", "saKey4"), Arrays.asList("shKey1", "shKey2", "shKey3", "shKey4")));
}
Also used : Tenant(org.thingsboard.server.common.data.Tenant) User(org.thingsboard.server.common.data.User) AttributesEntityView(org.thingsboard.server.common.data.objects.AttributesEntityView) Device(org.thingsboard.server.common.data.Device) TelemetryEntityView(org.thingsboard.server.common.data.objects.TelemetryEntityView) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 Device (org.thingsboard.server.common.data.Device)1 Tenant (org.thingsboard.server.common.data.Tenant)1 User (org.thingsboard.server.common.data.User)1 AttributesEntityView (org.thingsboard.server.common.data.objects.AttributesEntityView)1 TelemetryEntityView (org.thingsboard.server.common.data.objects.TelemetryEntityView)1