diff --git a/sensorhub-core/build.gradle b/sensorhub-core/build.gradle index dcee818da..03699413b 100644 --- a/sensorhub-core/build.gradle +++ b/sensorhub-core/build.gradle @@ -14,7 +14,11 @@ dependencies { testImplementation project(path: ':sensorml-core', configuration: 'testArtifacts') testImplementation 'commons-io:commons-io:1.3.2' - testImplementation 'com.github.stefanbirkner:system-rules:1.19.0' +} + +test { + environment 'SimpleEnvironment', 'value2' + environment 'DuplicateKey', 'value4' } // add info to OSGI manifest diff --git a/sensorhub-core/src/test/java/org/sensorhub/utils/TestVariableExpansion.java b/sensorhub-core/src/test/java/org/sensorhub/utils/TestVariableExpansion.java index c77b24e6b..8ec7199bf 100644 --- a/sensorhub-core/src/test/java/org/sensorhub/utils/TestVariableExpansion.java +++ b/sensorhub-core/src/test/java/org/sensorhub/utils/TestVariableExpansion.java @@ -10,20 +10,25 @@ import org.junit.After; import org.junit.Before; -import org.junit.Rule; import org.junit.Test; -import org.junit.contrib.java.lang.system.EnvironmentVariables; /** * Various tests to ensure the functionality of the {@link ModuleUtils#expand(String)} and * {@link ModuleUtils#expand(String, boolean)} methods. + * + *
+ * The following environment variables must be set for all tests to succeed:
+ * - SimpleEnvironment: value2
+ * - DuplicateKey: value4
+ *