aboutsummaryrefslogtreecommitdiffstats
path: root/services/services-engine/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'services/services-engine/src/test')
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ApexParametersTest.java35
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java6
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ExecutorParameterTests.java21
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java18
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/SyncParameterTests.java30
5 files changed, 55 insertions, 55 deletions
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ApexParametersTest.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ApexParametersTest.java
index 4a946b111..ff97eaec2 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ApexParametersTest.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ApexParametersTest.java
@@ -1,19 +1,20 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
@@ -39,9 +40,8 @@ import org.onap.policy.common.parameters.ParameterException;
public class ApexParametersTest {
@Test
- public void javaPropertiesOk() throws ParameterException {
- final String[] args =
- { "-c", "src/test/resources/parameters/javaPropertiesOK.json" };
+ public void testJavaPropertiesOk() throws ParameterException {
+ final String[] args = {"-c", "src/test/resources/parameters/javaPropertiesOK.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -57,9 +57,8 @@ public class ApexParametersTest {
}
@Test
- public void javaPropertiesEmpty() throws ParameterException {
- final String[] args =
- { "-c", "src/test/resources/parameters/javaPropertiesEmpty.json" };
+ public void testJavaPropertiesEmpty() throws ParameterException {
+ final String[] args = {"-c", "src/test/resources/parameters/javaPropertiesEmpty.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -69,12 +68,10 @@ public class ApexParametersTest {
fail("This test should not throw an exception");
}
}
-
@Test
- public void javaPropertiesBad() throws ParameterException {
- final String[] args =
- { "-c", "src/test/resources/parameters/javaPropertiesBad.json" };
+ public void testJavaPropertiesBad() throws ParameterException {
+ final String[] args = {"-c", "src/test/resources/parameters/javaPropertiesBad.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -87,23 +84,23 @@ public class ApexParametersTest {
assertTrue(pe.getMessage().contains("java properties array entry is null"));
}
}
-
+
@Test
public void testGettersSetters() {
ApexParameters pars = new ApexParameters();
assertNotNull(pars);
-
+
pars.setEngineServiceParameters(null);
assertNull(pars.getEngineServiceParameters());
-
+
pars.setEventInputParameters(null);
assertNull(pars.getEventInputParameters());
-
+
pars.setEventOutputParameters(null);
assertNull(pars.getEventOutputParameters());
-
+
assertFalse(pars.checkJavaPropertiesSet());
-
+
pars.setName("parName");
assertEquals("parName", pars.getName());
}
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java
index de78bb0fe..f6d39f029 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java
@@ -118,8 +118,10 @@ public class ContextParameterTests {
+ "\"src/test/resources/parameters/serviceContextBadPluginClassParams.json\""
+ "\n(ClassCastException):class org.onap.policy.apex.service.engine.parameters."
+ "dummyclasses.SuperDooperExecutorParameters"
- + " cannot be cast to class org.onap.policy.apex.context.parameters.ContextParameters (org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters and org.onap.policy.apex.context.parameters.ContextParameters are in unnamed module of loader 'app')",
- e.getMessage());
+ + " cannot be cast to class org.onap.policy.apex.context.parameters.ContextParameters "
+ + "(org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters and "
+ + "org.onap.policy.apex.context.parameters.ContextParameters are "
+ + "in unnamed module of loader 'app')", e.getMessage());
}
}
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ExecutorParameterTests.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ExecutorParameterTests.java
index 2af051ea7..16a892f93 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ExecutorParameterTests.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ExecutorParameterTests.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -43,7 +44,7 @@ public class ExecutorParameterTests {
}
@Test
- public void noParamsTest() {
+ public void testNoParamsTest() {
final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorNoParams.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -57,7 +58,7 @@ public class ExecutorParameterTests {
}
@Test
- public void badParamsTest() {
+ public void testBadParamsTest() {
final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorBadParams.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -73,7 +74,7 @@ public class ExecutorParameterTests {
}
@Test
- public void noExecutorParamsTest() {
+ public void testNoExecutorParamsTest() {
final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorNoExecutorParams.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -89,7 +90,7 @@ public class ExecutorParameterTests {
}
@Test
- public void emptyParamsTest() {
+ public void testEmptyParamsTest() {
final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorEmptyParams.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -105,7 +106,7 @@ public class ExecutorParameterTests {
}
@Test
- public void badPluginParamNameTest() {
+ public void testBadPluginParamNameTest() {
final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorBadPluginNameParams.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -121,7 +122,7 @@ public class ExecutorParameterTests {
}
@Test
- public void badPluginParamObjectTest() {
+ public void testBadPluginParamObjectTest() {
final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorBadPluginValueObjectParams.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -137,7 +138,7 @@ public class ExecutorParameterTests {
}
@Test
- public void badPluginParamBlankTest() {
+ public void testBadPluginParamBlankTest() {
final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorBadPluginValueBlankParams.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -153,7 +154,7 @@ public class ExecutorParameterTests {
}
@Test
- public void badPluginParamValueTest() {
+ public void testBadPluginParamValueTest() {
final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorBadPluginValueParams.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -170,7 +171,7 @@ public class ExecutorParameterTests {
}
@Test
- public void goodParametersTest() {
+ public void testGoodParametersTest() {
final String[] args = {"-c", "src/test/resources/parameters/goodParams.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -188,7 +189,7 @@ public class ExecutorParameterTests {
}
@Test
- public void relativeParametersTest() {
+ public void testRelativeParametersTest() {
// @formatter:off
final String[] args = {
"-rfr",
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java
index e12bb6142..3da98163a 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -48,7 +48,7 @@ import org.onap.policy.common.parameters.ParameterException;
*/
public class ParameterTests {
@Test
- public void invalidParametersNoFileTest() throws ParameterException {
+ public void testInvalidParametersNoFileTest() throws ParameterException {
final String[] args = {"-c", "src/test/resources/parameters/invalidNoFile.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -62,7 +62,7 @@ public class ParameterTests {
}
@Test
- public void invalidParametersEmptyTest() {
+ public void testInvalidParametersEmptyTest() {
final String[] args = {"-c", "src/test/resources/parameters/empty.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -76,7 +76,7 @@ public class ParameterTests {
}
@Test
- public void invalidParametersNoParamsTest() {
+ public void testInvalidParametersNoParamsTest() {
final String[] args = {"-c", "src/test/resources/parameters/noParams.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -97,7 +97,7 @@ public class ParameterTests {
}
@Test
- public void invalidParametersBlankParamsTest() {
+ public void testInvalidParametersBlankParamsTest() {
final String[] args = {"-c", "src/test/resources/parameters/blankParams.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -122,7 +122,7 @@ public class ParameterTests {
}
@Test
- public void invalidParametersTest() {
+ public void testInvalidParametersTest() {
final String[] args = {"-c", "src/test/resources/parameters/badParams.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -168,7 +168,7 @@ public class ParameterTests {
}
@Test
- public void modelNotFileTest() {
+ public void testModelNotFileTest() {
final String[] args = {"-c", "src/test/resources/parameters/badParamsModelNotFile.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -190,7 +190,7 @@ public class ParameterTests {
}
@Test
- public void goodParametersTest() {
+ public void testGoodParametersTest() {
final String[] args = {"-c", "src/test/resources/parameters/goodParams.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -239,7 +239,7 @@ public class ParameterTests {
}
@Test
- public void superDooperParametersTest() {
+ public void testSuperDooperParametersTest() {
final String[] args = {"-c", "src/test/resources/parameters/superDooperParams.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/SyncParameterTests.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/SyncParameterTests.java
index 3da682884..b32ba14ba 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/SyncParameterTests.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/SyncParameterTests.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -45,7 +45,7 @@ import org.onap.policy.common.parameters.ParameterException;
*/
public class SyncParameterTests {
@Test
- public void syncBadNoSyncWithPeer() throws ParameterException {
+ public void testSyncBadNoSyncWithPeer() throws ParameterException {
final String[] args = {"-c", "src/test/resources/parameters/syncBadParamsNoSyncWithPeer.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -67,7 +67,7 @@ public class SyncParameterTests {
}
@Test
- public void syncBadNotSyncWithPeer() throws ParameterException {
+ public void testSyncBadNotSyncWithPeer() throws ParameterException {
final String[] args = {"-c", "src/test/resources/parameters/syncBadParamsNotSyncWithPeer.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -89,7 +89,7 @@ public class SyncParameterTests {
}
@Test
- public void syncBadSyncBadPeers() throws ParameterException {
+ public void testSyncBadSyncBadPeers() throws ParameterException {
final String[] args = {"-c", "src/test/resources/parameters/syncBadParamsBadPeers.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -122,7 +122,7 @@ public class SyncParameterTests {
}
@Test
- public void syncBadSyncInvalidTimeout() throws ParameterException {
+ public void testSyncBadSyncInvalidTimeout() throws ParameterException {
final String[] args = {"-c", "src/test/resources/parameters/syncBadParamsInvalidTimeout.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -157,7 +157,7 @@ public class SyncParameterTests {
}
@Test
- public void syncBadSyncBadTimeout() throws ParameterException {
+ public void testSyncBadSyncBadTimeout() throws ParameterException {
final String[] args = {"-c", "src/test/resources/parameters/syncBadParamsBadTimeout.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -179,7 +179,7 @@ public class SyncParameterTests {
}
@Test
- public void syncBadSyncUnpairedTimeout() throws ParameterException {
+ public void testSyncBadSyncUnpairedTimeout() throws ParameterException {
final String[] args = {"-c", "src/test/resources/parameters/syncBadParamsUnpairedTimeout.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -216,7 +216,7 @@ public class SyncParameterTests {
}
@Test
- public void syncGoodSyncGoodTimeoutProducer() throws ParameterException {
+ public void testSyncGoodSyncGoodTimeoutProducer() throws ParameterException {
final String[] args = {"-c", "src/test/resources/parameters/syncGoodParamsProducerTimeout.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -236,7 +236,7 @@ public class SyncParameterTests {
}
@Test
- public void syncGoodSyncGoodTimeoutConsumer() throws ParameterException {
+ public void testSyncGoodSyncGoodTimeoutConsumer() throws ParameterException {
final String[] args = {"-c", "src/test/resources/parameters/syncGoodParamsConsumerTimeout.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -256,7 +256,7 @@ public class SyncParameterTests {
}
@Test
- public void syncGoodSyncGoodTimeoutBoth() throws ParameterException {
+ public void testSyncGoodSyncGoodTimeoutBoth() throws ParameterException {
final String[] args = {"-c", "src/test/resources/parameters/syncGoodParamsBothTimeout.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -276,7 +276,7 @@ public class SyncParameterTests {
}
@Test
- public void syncUnusedConsumerPeers() throws ParameterException {
+ public void testSyncUnusedConsumerPeers() throws ParameterException {
final String[] args = {"-c", "src/test/resources/parameters/syncUnusedConsumerPeers.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -305,7 +305,7 @@ public class SyncParameterTests {
}
@Test
- public void syncMismatchedPeers() throws ParameterException {
+ public void testSyncMismatchedPeers() throws ParameterException {
final String[] args = {"-c", "src/test/resources/parameters/syncMismatchedPeers.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -342,7 +342,7 @@ public class SyncParameterTests {
}
@Test
- public void syncUnusedProducerPeers() throws ParameterException {
+ public void testSyncUnusedProducerPeers() throws ParameterException {
final String[] args = {"-c", "src/test/resources/parameters/syncUnusedProducerPeers.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -369,7 +369,7 @@ public class SyncParameterTests {
}
@Test
- public void syncMismatchedTimeout() throws ParameterException {
+ public void testSyncMismatchedTimeout() throws ParameterException {
final String[] args = {"-c", "src/test/resources/parameters/syncMismatchedTimeout.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
@@ -398,7 +398,7 @@ public class SyncParameterTests {
}
@Test
- public void syncGoodParametersTest() {
+ public void testSyncGoodParametersTest() {
final String[] args = {"-c", "src/test/resources/parameters/syncGoodParams.json"};
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);