public class ConnectorsAasTest extends Object
| Modifier and Type | Class and Description |
|---|---|
private static class |
ConnectorsAasTest.Connector1<CO,CI>
Implements a fake/mock connector with
MachineConnector. |
static class |
ConnectorsAasTest.Connector1Descriptor
A test descriptor.
|
private static class |
ConnectorsAasTest.Connector2<CO,CI>
Implements a fake/mock connector without
MachineConnector. |
static class |
ConnectorsAasTest.Connector2Descriptor
A test descriptor.
|
private static class |
ConnectorsAasTest.DataIn1
Some input data.
|
private static class |
ConnectorsAasTest.DataIn2
Some input data.
|
private static class |
ConnectorsAasTest.DataOut1
Some output data.
|
private static class |
ConnectorsAasTest.DataOut2
Some output data.
|
| Modifier and Type | Field and Description |
|---|---|
private static String |
NAME_CONN1 |
private static String |
NAME_CONN2 |
| Constructor and Description |
|---|
ConnectorsAasTest() |
| Modifier and Type | Method and Description |
|---|---|
private static void |
assertBooleanProperty(boolean expected,
de.iip_ecosphere.platform.support.aas.SubmodelElementCollection sec,
String propertyName)
Asserts a boolean property on a sub-model element collection.
|
private static void |
assertReferenceElement(boolean hasRef,
de.iip_ecosphere.platform.support.aas.SubmodelElementCollection sec,
String propertyName)
Asserts a reference element.
|
private static void |
assertStringProperty(String expected,
de.iip_ecosphere.platform.support.aas.SubmodelElementCollection sec,
String propertyName)
Asserts a String property on a sub-model element collection.
|
private static ConnectorsAasTest.Connector1<ConnectorsAasTest.DataOut1,ConnectorsAasTest.DataIn1> |
createConnector1Instance()
Creates an instance of
ConnectorsAasTest.Connector1. |
private static ConnectorsAasTest.Connector2<ConnectorsAasTest.DataOut2,ConnectorsAasTest.DataIn2> |
createConnector2Instance()
Creates an instance of
ConnectorsAasTest.Connector1. |
private void |
printOut(de.iip_ecosphere.platform.support.aas.Aas aas)
Print the AAS to the console.
|
void |
testAas()
Tests the connectors AAS.
|
private void |
testActiveDescriptors(List<de.iip_ecosphere.platform.connectors.Connector<?,?,?,?>> connectors,
int expectedActive)
Tests the connector descriptors in their sub-model.
|
private void |
testDescriptorsSubmodel(de.iip_ecosphere.platform.support.aas.Aas aas)
Tests the connector descriptors in their sub model.
|
private static final String NAME_CONN1
private static final String NAME_CONN2
private void printOut(de.iip_ecosphere.platform.support.aas.Aas aas)
aas - the AAS to printpublic void testAas()
throws IOException
IOExceptionprivate static ConnectorsAasTest.Connector1<ConnectorsAasTest.DataOut1,ConnectorsAasTest.DataIn1> createConnector1Instance()
ConnectorsAasTest.Connector1.private static ConnectorsAasTest.Connector2<ConnectorsAasTest.DataOut2,ConnectorsAasTest.DataIn2> createConnector2Instance()
ConnectorsAasTest.Connector1.private void testDescriptorsSubmodel(de.iip_ecosphere.platform.support.aas.Aas aas)
aas - the AAS to inspectprivate static void assertBooleanProperty(boolean expected,
de.iip_ecosphere.platform.support.aas.SubmodelElementCollection sec,
String propertyName)
throws ExecutionException
expected - the expected valuesec - the sub-model element collectionpropertyName - the property nameExecutionException - in case that the property cannot be readprivate static void assertStringProperty(String expected, de.iip_ecosphere.platform.support.aas.SubmodelElementCollection sec, String propertyName) throws ExecutionException
expected - the expected valuesec - the sub-model element collectionpropertyName - the property nameExecutionException - in case that the property cannot be readprivate static void assertReferenceElement(boolean hasRef,
de.iip_ecosphere.platform.support.aas.SubmodelElementCollection sec,
String propertyName)
throws ExecutionException
hasRef - whether there shall be a reference valuesec - the sub-model element collectionpropertyName - the property nameExecutionException - in case that the property cannot be readprivate void testActiveDescriptors(List<de.iip_ecosphere.platform.connectors.Connector<?,?,?,?>> connectors, int expectedActive) throws IOException
connectors - all connectors instantiated for this test, active an non-activeexpectedActive - the expected number of connectors in the active sub-modelIOException - shall not occurCopyright © 2022. All rights reserved.