Class EcsAasTest
- java.lang.Object
-
- test.de.iip_ecosphere.platform.ecsRuntime.EcsAasTest
-
public class EcsAasTest extends java.lang.ObjectTests theEcsAas.- Author:
- Holger Eichelberger, SSE
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.function.Predicate<java.lang.Object>POSITIVE_GAUGE_VALUEA predicate testing whether the value of a JSON gauge is positive.private static de.iip_ecosphere.platform.support.Serverqpid
-
Constructor Summary
Constructors Constructor Description EcsAasTest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidassertMetrics(java.util.Map<java.lang.String,java.util.function.Predicate<java.lang.Object>> expected)Asserts the existence of selected AAS metrics and/or their values.static voidshutdown()Shuts down the test.static voidstartup()Initializes the test.private voidtest(de.iip_ecosphere.platform.ecsRuntime.EcsAasClient client)Tests the givenclient.voidtestAas()Tests theEcsAas.voidtestLifecycle()Tests theEcsAasvia the lifecycle descriptors.
-
-
-
Method Detail
-
startup
public static void startup()
Initializes the test.
-
shutdown
public static void shutdown()
Shuts down the test.
-
testAas
public void testAas() throws java.io.IOException, java.util.concurrent.ExecutionException, java.net.URISyntaxExceptionTests theEcsAas.- Throws:
java.io.IOException- shall not occurjava.util.concurrent.ExecutionException- shall not occurjava.net.URISyntaxException- shall not occur
-
testLifecycle
public void testLifecycle() throws java.io.IOException, java.util.concurrent.ExecutionException, java.net.URISyntaxExceptionTests theEcsAasvia the lifecycle descriptors.- Throws:
java.io.IOException- shall not occurjava.util.concurrent.ExecutionException- shall not occurjava.net.URISyntaxException- shall not occur
-
assertMetrics
private void assertMetrics(java.util.Map<java.lang.String,java.util.function.Predicate<java.lang.Object>> expected) throws java.io.IOException, java.util.concurrent.ExecutionExceptionAsserts the existence of selected AAS metrics and/or their values.- Parameters:
expected- the expected metrics as key-predicate pairs, whereby the predicate may be null to indicated that the value shall not be tested- Throws:
java.io.IOException- if the AAS cannot be retrievedjava.util.concurrent.ExecutionException- if a property cannot be queried
-
test
private void test(de.iip_ecosphere.platform.ecsRuntime.EcsAasClient client) throws java.util.concurrent.ExecutionException, java.net.URISyntaxException, java.io.IOExceptionTests the givenclient.- Parameters:
client- the client to test- Throws:
java.util.concurrent.ExecutionException- shall not occurjava.net.URISyntaxException- shall not occurjava.io.IOException- shall not occur
-
-