Class ConfigurationTests
java.lang.Object
test.de.iip_ecosphere.platform.support.TestWithPlugin
test.de.iip_ecosphere.platform.support.aas.TestWithPlugin
test.de.iip_ecosphere.platform.transport.TestWithQpid
test.de.iip_ecosphere.platform.examples.ConfigurationTests
public class ConfigurationTests
extends test.de.iip_ecosphere.platform.transport.TestWithQpid
Executes tests on runnable configuration.configuration examples.
- Author:
- Holger Eichelberger, SSE
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static de.iip_ecosphere.platform.support.ServerAddressprivate static final booleanprivate static de.iip_ecosphere.platform.support.ServerFields inherited from class test.de.iip_ecosphere.platform.transport.TestWithQpid
qpidFields inherited from class test.de.iip_ecosphere.platform.support.TestWithPlugin
PROP_AAS_PLUGIN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static final voidassertContains(String output, String test) Asserts whetheroutputcontainstest.private static final voidassertMatches(String output, String regEx) Asserts whetheroutputmatchesregEx.private static final voidconfigureProcess(ProcessBuilder pb, File res) Configures the process builderpbfor output handling depending onDEBUG.static voidshutdown()Stops the broker.static voidstartup()Starts the broker.private voidtestInstantiatedExample(String folder, String appName, int stopTime, Consumer<String> asserter) Tests an instantiated example.voidTests the routing test from configuration.configuration.voidTests the simple mesh example from configuration.configuration.voidTests the simple mesh 3 example from configuration.configuration.Methods inherited from class test.de.iip_ecosphere.platform.transport.TestWithQpid
addPlugin, fromPlugin, stopQpidMethods inherited from class test.de.iip_ecosphere.platform.support.aas.TestWithPlugin
setAasPluginId, setup, setupAASPluginsMethods inherited from class test.de.iip_ecosphere.platform.support.TestWithPlugin
addPluginLocation, addRunAfterLoading, clear, enableLocalPlugins, loadPlugins, setInstallDir
-
Field Details
-
broker
private static de.iip_ecosphere.platform.support.ServerAddress broker -
server
private static de.iip_ecosphere.platform.support.Server server -
SIMPLE_RECEIVED_ASSERTER
-
DEBUG
private static final boolean DEBUG- See Also:
-
-
Constructor Details
-
ConfigurationTests
public ConfigurationTests()
-
-
Method Details
-
configureProcess
Configures the process builderpbfor output handling depending onDEBUG.- Parameters:
pb- the process builderres- the file to redirect the output to ifDEBUGis false.
-
assertContains
Asserts whetheroutputcontainstest.- Parameters:
output- the output to testtest- the test string to search withinoutput
-
assertMatches
Asserts whetheroutputmatchesregEx.- Parameters:
output- the output to testregEx- the regular expression to match withinoutput
-
startup
public static void startup()Starts the broker. -
shutdown
public static void shutdown()Stops the broker. -
testInstantiatedExample
private void testInstantiatedExample(String folder, String appName, int stopTime, Consumer<String> asserter) throws IOException Tests an instantiated example.- Parameters:
folder- the example folder in genappName- the app name/artifact name without versionstopTime- the time to stop the application/testasserter- asserts on the output log- Throws:
IOException- if any I/O reading problem occurs
-
testSimpleMesh
Tests the simple mesh example from configuration.configuration.- Throws:
IOException- if any I/O problem occurs
-
testSimpleMesh3
Tests the simple mesh 3 example from configuration.configuration.- Throws:
IOException- if any I/O problem occurs
-
testRoutingTest
Tests the routing test from configuration.configuration.- Throws:
IOException- if any I/O problem occurs
-