aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/plugins-executor/plugins-executor-jython/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/plugins-executor/plugins-executor-jython/src')
-rw-r--r--plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonStateFinalizerExecutorTest.java7
-rw-r--r--plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutorTest.java10
-rw-r--r--plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutorTest.java8
3 files changed, 15 insertions, 10 deletions
diff --git a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonStateFinalizerExecutorTest.java b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonStateFinalizerExecutorTest.java
index 213dddb9b..69ced72ad 100644
--- a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonStateFinalizerExecutorTest.java
+++ b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonStateFinalizerExecutorTest.java
@@ -25,6 +25,7 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
import java.util.Map;
+import java.util.Properties;
import java.util.TreeMap;
import org.junit.After;
import org.junit.Before;
@@ -130,7 +131,7 @@ public class JythonStateFinalizerExecutorTest {
stateFinalizerLogic.setLogic(scriptSource);
try {
jsfe.prepare();
- jsfe.execute(-1, null, null);
+ jsfe.execute(-1, new Properties(), null);
fail("test should throw an exception here");
} catch (Exception jtseException) {
assertEquals(
@@ -151,7 +152,7 @@ public class JythonStateFinalizerExecutorTest {
AxEvent axEvent = new AxEvent(new AxArtifactKey("Event", "0.0.1"));
EnEvent event = new EnEvent(axEvent);
try {
- jsfe.execute(0, null, event);
+ jsfe.execute(0, new Properties(), event);
} catch (Exception jtseException) {
jtseException.printStackTrace();
fail("test should not throw an exception here");
@@ -159,7 +160,7 @@ public class JythonStateFinalizerExecutorTest {
try {
jsfe.prepare();
- String stateOutput = jsfe.execute(0, null, event);
+ String stateOutput = jsfe.execute(0, new Properties(), event);
assertEquals("SelectedOutputIsMe", stateOutput);
jsfe.cleanUp();
} catch (Exception jtseException) {
diff --git a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutorTest.java b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutorTest.java
index 47e98f391..ee116aa37 100644
--- a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutorTest.java
+++ b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutorTest.java
@@ -26,6 +26,8 @@ import static org.junit.Assert.fail;
import java.util.HashMap;
import java.util.Map;
+import java.util.Properties;
+
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -103,7 +105,7 @@ public class JythonTaskExecutorTest {
}
try {
- jte.execute(-1, null, null);
+ jte.execute(-1, new Properties(), null);
fail("test should throw an exception here");
} catch (Exception jteException) {
assertEquals(java.lang.NullPointerException.class, jteException.getClass());
@@ -111,7 +113,7 @@ public class JythonTaskExecutorTest {
Map<String, Object> incomingParameters = new HashMap<>();
try {
- jte.execute(-1, null, incomingParameters);
+ jte.execute(-1, new Properties(), incomingParameters);
fail("test should throw an exception here");
} catch (Exception jteException) {
assertEquals("failed to execute Jython code for task NULL:0.0.0", jteException.getMessage());
@@ -124,7 +126,7 @@ public class JythonTaskExecutorTest {
try {
jte.prepare();
- Map<String, Object> returnMap = jte.execute(-1, null, incomingParameters);
+ Map<String, Object> returnMap = jte.execute(-1, new Properties(), incomingParameters);
assertEquals(0, returnMap.size());
jte.cleanUp();
fail("test should throw an exception here");
@@ -136,7 +138,7 @@ public class JythonTaskExecutorTest {
task.getTaskLogic().setLogic(scriptSource);
try {
jte.prepare();
- Map<String, Object> returnMap = jte.execute(0, null, incomingParameters);
+ Map<String, Object> returnMap = jte.execute(0, new Properties(), incomingParameters);
assertEquals(0, returnMap.size());
jte.cleanUp();
} catch (Exception jteException) {
diff --git a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutorTest.java b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutorTest.java
index 119f4d035..fb7735a46 100644
--- a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutorTest.java
+++ b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutorTest.java
@@ -24,6 +24,8 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
+import java.util.Properties;
+
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -99,7 +101,7 @@ public class JythonTaskSelectExecutorTest {
state.getTaskSelectionLogic().setLogic(scriptSource);
try {
jtse.prepare();
- jtse.execute(-1, null, null);
+ jtse.execute(-1, new Properties(), null);
fail("test should throw an exception here");
} catch (Exception jtseException) {
assertEquals(java.lang.NullPointerException.class, jtseException.getClass());
@@ -109,7 +111,7 @@ public class JythonTaskSelectExecutorTest {
EnEvent event = new EnEvent(axEvent);
try {
jtse.prepare();
- jtse.execute(-1, null, event);
+ jtse.execute(-1, new Properties(), event);
fail("test should throw an exception here");
} catch (Exception jtseException) {
assertEquals("failed to execute Jython code for task selection logic in NULL:0.0.0:NULL:NULL",
@@ -120,7 +122,7 @@ public class JythonTaskSelectExecutorTest {
state.getTaskSelectionLogic().setLogic(scriptSource);
try {
jtse.prepare();
- jtse.execute(-1, null, event);
+ jtse.execute(-1, new Properties(), event);
jtse.cleanUp();
} catch (Exception jtseException) {
fail("test should not throw an exception here");