Class InfluxConnectorTest
java.lang.Object
test.de.iip_ecosphere.platform.connectors.influxv3.InfluxConnectorTest
@PrepareForTest(com.influxdb.v3.client.InfluxDBClient.class)
public class InfluxConnectorTest
extends Object
Tests the
InfluxConnector.- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classCustomizes the type translators/assertions for this case. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List<test.de.iip_ecosphere.platform.connectors.MachineData> private com.influxdb.v3.client.Point -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate Stream<com.influxdb.v3.client.PointValues> Creates/returns INFLUX data/query result for mocking.voidTests theInfluxConnector.private intTurns an INFLUX object value to an int.private test.de.iip_ecosphere.platform.connectors.MachineCommandtoMachineCommand(com.influxdb.v3.client.Point point) Turns a point back to a machine command.
-
Field Details
-
written
private com.influxdb.v3.client.Point written -
expectedData
-
-
Constructor Details
-
InfluxConnectorTest
public InfluxConnectorTest()
-
-
Method Details
-
getDataTable
Creates/returns INFLUX data/query result for mocking.- Returns:
- the table(s)
-
toMachineCommand
private test.de.iip_ecosphere.platform.connectors.MachineCommand toMachineCommand(com.influxdb.v3.client.Point point) Turns a point back to a machine command.- Parameters:
point- the point- Returns:
- the machine command instance, null if value access is not possible
-
toInt
Turns an INFLUX object value to an int.- Parameters:
field- the field to read the value fromdflt- a default value if the stored object does not exist or cannot be convertedfields- the point fields to read the value from- Returns:
- the int value or
dflt
-
testInfluxConnector
Tests theInfluxConnector.- Throws:
Exception- shall not occur
-