aboutsummaryrefslogtreecommitdiffstats
path: root/testsuites/integration/integration-executor-test/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites/integration/integration-executor-test/src/test')
-rw-r--r--testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexEngine.java11
-rw-r--r--testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/event/TestEventInstantiation.java14
-rw-r--r--testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/handling/TestContextUpdateModel.java6
3 files changed, 15 insertions, 16 deletions
diff --git a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexEngine.java b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexEngine.java
index 003f04f7c..01107e968 100644
--- a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexEngine.java
+++ b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexEngine.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.
@@ -49,14 +49,13 @@ public class TestApexEngine {
/**
* Instantiates a new test apex engine.
*
- * @param axLogicExecutorType the type of logic executor to use to construct the sample policy
- * model for this test
+ * @param axLogicExecutorType the type of logic executor to use to construct the sample policy model for this test
* @throws ApexException the apex exception
* @throws InterruptedException the interrupted exception
* @throws IOException Signals that an I/O exception has occurred.
*/
- public TestApexEngine(final String axLogicExecutorType, final EngineParameters parameters)
- throws ApexException, InterruptedException, IOException {
+ public TestApexEngine(final String axLogicExecutorType,
+ final EngineParameters parameters) throws ApexException, InterruptedException, IOException {
logger.debug("Running TestApexEngine test for + " + axLogicExecutorType + "logic . . .");
final AxPolicyModel apexPolicyModel = new SampleDomainModelFactory().getSamplePolicyModel(axLogicExecutorType);
@@ -75,7 +74,7 @@ public class TestApexEngine {
final Date aDate = new Date(1433453067123L);
final Map<String, Object> eventDataMap = new HashMap<String, Object>();
eventDataMap.put("TestSlogan", "This is a test slogan for event " + event.getName());
- eventDataMap.put("TestMatchCase", new Byte((byte) 123));
+ eventDataMap.put("TestMatchCase", (byte) 123);
eventDataMap.put("TestTimestamp", aDate.getTime());
eventDataMap.put("TestTemperature", 34.5445667);
diff --git a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/event/TestEventInstantiation.java b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/event/TestEventInstantiation.java
index fb5894656..7522abe0a 100644
--- a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/event/TestEventInstantiation.java
+++ b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/event/TestEventInstantiation.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.
@@ -137,13 +137,13 @@ public class TestEventInstantiation {
assertNotNull(slogan1);
assertEquals("This is a slogan", slogan1);
- Object mc1 = event.put("TestMatchCase", new Byte("4"));
+ Object mc1 = event.put("TestMatchCase", Byte.valueOf("4"));
assertNull(mc1);
mc1 = event.get("TestMatchCase");
assertNotNull(mc1);
assertEquals((byte) 4, mc1);
- Object mc2 = event.put("TestMatchCase", new Byte("16"));
+ Object mc2 = event.put("TestMatchCase", Byte.valueOf("16"));
assertNotNull(mc2);
assertEquals((byte) 4, mc2);
mc2 = event.get("TestMatchCase");
@@ -173,17 +173,17 @@ public class TestEventInstantiation {
event.put("TestMatchCase", "Hello");
} catch (final Exception e) {
assertEquals("Event0000:0.0.1:NULL:TestMatchCase: object \"Hello\" of class \"java.lang.String\" "
- + "not compatible with class \"java.lang.Byte\"", e.getMessage());
+ + "not compatible with class \"java.lang.Byte\"", e.getMessage());
}
try {
event.put("TestMatchCase", 123.45);
} catch (final Exception e) {
assertEquals("Event0000:0.0.1:NULL:TestMatchCase: object \"123.45\" of class \"java.lang.Double\" "
- + "not compatible with class \"java.lang.Byte\"", e.getMessage());
+ + "not compatible with class \"java.lang.Byte\"", e.getMessage());
}
- event.put("TestMatchCase", new Byte("16"));
+ event.put("TestMatchCase", Byte.valueOf("16"));
final String slogan2 = (String) event.get("TestSlogan");
assertNotNull(slogan2);
@@ -212,7 +212,7 @@ public class TestEventInstantiation {
final Date aDate = new Date(1433453067123L);
final Map<String, Object> eventDataList = new HashMap<String, Object>();
eventDataList.put("TestSlogan", "This is a test slogan");
- eventDataList.put("TestMatchCase", new Byte("123"));
+ eventDataList.put("TestMatchCase", Byte.valueOf("123"));
eventDataList.put("TestTimestamp", aDate.getTime());
eventDataList.put("TestTemperature", 34.5445667);
diff --git a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/handling/TestContextUpdateModel.java b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/handling/TestContextUpdateModel.java
index 94bf0c8b8..1d33d3f21 100644
--- a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/handling/TestContextUpdateModel.java
+++ b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/handling/TestContextUpdateModel.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.
@@ -184,11 +184,11 @@ public class TestContextUpdateModel {
* @throws ContextException the context exception
*/
private void sendEvent(final ApexEngine apexEngine, final TestApexActionListener listener, final String eventName,
- final boolean shouldWork) throws ContextException {
+ final boolean shouldWork) throws ContextException {
final Date aDate = new Date(1433453067123L);
final Map<String, Object> eventDataMap = new HashMap<String, Object>();
eventDataMap.put("TestSlogan", "This is a test slogan");
- eventDataMap.put("TestMatchCase", new Byte((byte) 123));
+ eventDataMap.put("TestMatchCase", (byte) 123);
eventDataMap.put("TestTimestamp", aDate.getTime());
eventDataMap.put("TestTemperature", 34.5445667);