Class IntegrationTests
java.lang.Object
de.iip_ecosphere.platform.deviceMgt.thingsboard.IntegrationTests
Implements the setup.
- Author:
- Holger Eichelberger, SSE
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidTests adding a valid device works.voidTests that a device has a valid id/ip.voidTests adding an invalid device does not work.voidTests that adding multiple devices adds all devices.voidTests that creating a device registry creats an instance.generateRandomIds(int count) Generates a given number of random ids.voidTests that getting a device descriptor returns valid data.voidTests that an added, alive device shall be available.voidTests that an added, none alive device shall be starting.voidTests that a timed out device shall be undefined.voidTests that removing a device works.voidTests that the REST client is able to connect.voidsetUp()Configures the test before running.voidtearDown()Cleans up after testing.
-
Field Details
-
A_DEVICE
- See Also:
-
AN_IP
- See Also:
-
registry
private de.iip_ecosphere.platform.deviceMgt.thingsboard.ThingsBoardDeviceRegistry registry -
restClient
private org.thingsboard.rest.client.RestClient restClient
-
-
Constructor Details
-
IntegrationTests
public IntegrationTests()
-
-
Method Details
-
setUp
public void setUp()Configures the test before running. -
tearDown
public void tearDown()Cleans up after testing. -
restClientIsAbleToConnect
public void restClientIsAbleToConnect()Tests that the REST client is able to connect. -
createDeviceRegistryInstance_createsInstance
public void createDeviceRegistryInstance_createsInstance()Tests that creating a device registry creats an instance. -
addDevice_withDevice_shouldAddDevice
public void addDevice_withDevice_shouldAddDevice()Tests adding a valid device works. -
addDevice_withOutDevice_shouldNotAddDevice
public void addDevice_withOutDevice_shouldNotAddDevice()Tests adding an invalid device does not work. -
addMultipleDevices_shouldAddAllDevices
public void addMultipleDevices_shouldAddAllDevices()Tests that adding multiple devices adds all devices. -
removeDevice_removesDevice
public void removeDevice_removesDevice()Tests that removing a device works. -
addDevice_withDeviceAndIp_hasDeviceIdInternalIdAndIp
public void addDevice_withDeviceAndIp_hasDeviceIdInternalIdAndIp()Tests that a device has a valid id/ip. -
getState_withDeviceAddedButNoAlive_shouldBeSTARTING
public void getState_withDeviceAddedButNoAlive_shouldBeSTARTING()Tests that an added, none alive device shall be starting. -
getState_withDeviceAddedAndAlive_shouldBeAVAILABLE
Tests that an added, alive device shall be available.- Throws:
ExecutionException- if AAS operations fail, shall not occur
-
getState_withTimedOutDevice_shouldBeUNDEFINED
public void getState_withTimedOutDevice_shouldBeUNDEFINED() throws ExecutionException, InterruptedExceptionTests that a timed out device shall be undefined.- Throws:
ExecutionException- if AAS operations fail, shall not occurInterruptedException- if timeouts occur, shall not happe
-
getRuntime_withValidDevice_returnsNull
public void getRuntime_withValidDevice_returnsNull()Tests that getting a device descriptor returns valid data. -
generateRandomIds
Generates a given number of random ids.- Parameters:
count- the number of ids to generate- Returns:
- the random ids
-