summaryrefslogtreecommitdiffstats
path: root/plugins/plugins-executor/plugins-executor-mvel
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/plugins-executor/plugins-executor-mvel')
-rw-r--r--plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelStateFinalizerExecutorTest.java10
-rw-r--r--plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskExecutorTest.java9
-rw-r--r--plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskSelectExecutorTest.java10
3 files changed, 17 insertions, 12 deletions
diff --git a/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelStateFinalizerExecutorTest.java b/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelStateFinalizerExecutorTest.java
index 5e66be30f..52d9a9a0a 100644
--- a/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelStateFinalizerExecutorTest.java
+++ b/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelStateFinalizerExecutorTest.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;
@@ -126,7 +128,7 @@ public class MvelStateFinalizerExecutorTest {
}
try {
- msfe.execute(-1, null, null);
+ msfe.execute(-1, new Properties(), null);
fail("test should throw an exception here");
} catch (Exception msfeException) {
assertEquals("failed to execute MVEL code for state NULL:0.0.0:NULL:NULL",
@@ -136,7 +138,7 @@ public class MvelStateFinalizerExecutorTest {
AxEvent axEvent = new AxEvent(new AxArtifactKey("Event", "0.0.1"));
EnEvent event = new EnEvent(axEvent);
try {
- msfe.execute(-1, null, event);
+ msfe.execute(-1, new Properties(), event);
fail("test should throw an exception here");
} catch (Exception msfeException) {
assertEquals("failed to execute MVEL code for state NULL:0.0.0:NULL:NULL",
@@ -146,7 +148,7 @@ public class MvelStateFinalizerExecutorTest {
stateFinalizerLogic.setLogic("executionId !=-1");
try {
msfe.prepare();
- msfe.execute(-1, null, event);
+ msfe.execute(-1, new Properties(), event);
fail("test should throw an exception here");
} catch (Exception msfeException) {
assertEquals(
@@ -161,7 +163,7 @@ public class MvelStateFinalizerExecutorTest {
state.getStateOutputs().put("SelectedOutputIsMe", null);
try {
msfe.prepare();
- String stateOutput = msfe.execute(0, null, event);
+ String stateOutput = msfe.execute(0, new Properties(), event);
assertEquals("SelectedOutputIsMe", stateOutput);
} catch (Exception msfeException) {
LOGGER.warn("Unexpected exception happened here.", msfeException);
diff --git a/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskExecutorTest.java b/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskExecutorTest.java
index 18bccd670..d4f84da7a 100644
--- a/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskExecutorTest.java
+++ b/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskExecutorTest.java
@@ -26,6 +26,7 @@ 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;
@@ -103,7 +104,7 @@ public class MvelTaskExecutorTest {
}
try {
- mte.execute(-1, null, null);
+ mte.execute(-1, new Properties(), null);
fail("test should throw an exception here");
} catch (Exception mteException) {
assertEquals(java.lang.NullPointerException.class, mteException.getClass());
@@ -111,7 +112,7 @@ public class MvelTaskExecutorTest {
Map<String, Object> incomingParameters = new HashMap<>();
try {
- mte.execute(-1, null, incomingParameters);
+ mte.execute(-1, new Properties(), incomingParameters);
fail("test should throw an exception here");
} catch (Exception mteException) {
assertEquals("failed to execute MVEL code for task NULL:0.0.0", mteException.getMessage());
@@ -120,7 +121,7 @@ public class MvelTaskExecutorTest {
task.getTaskLogic().setLogic("executionId != -1");
try {
mte.prepare();
- mte.execute(-1, null, incomingParameters);
+ mte.execute(-1, new Properties(), incomingParameters);
fail("test should throw an exception here");
} catch (Exception mteException) {
assertEquals("execute-post: task logic execution failure on task \"NULL\" in model NULL:0.0.0",
@@ -129,7 +130,7 @@ public class MvelTaskExecutorTest {
try {
mte.prepare();
- Map<String, Object> returnMap = mte.execute(0, null, incomingParameters);
+ Map<String, Object> returnMap = mte.execute(0, new Properties(), incomingParameters);
assertEquals(0, returnMap.size());
mte.cleanUp();
} catch (Exception mteException) {
diff --git a/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskSelectExecutorTest.java b/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskSelectExecutorTest.java
index 05591b075..153eeca03 100644
--- a/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskSelectExecutorTest.java
+++ b/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskSelectExecutorTest.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;
@@ -103,7 +105,7 @@ public class MvelTaskSelectExecutorTest {
}
try {
- mtse.execute(-1, null, null);
+ mtse.execute(-1, new Properties(), null);
fail("test should throw an exception here");
} catch (Exception mtseException) {
assertEquals(java.lang.NullPointerException.class, mtseException.getClass());
@@ -112,7 +114,7 @@ public class MvelTaskSelectExecutorTest {
AxEvent axEvent = new AxEvent(new AxArtifactKey("Event", "0.0.1"));
EnEvent event = new EnEvent(axEvent);
try {
- mtse.execute(-1, null, event);
+ mtse.execute(-1, new Properties(), event);
fail("test should throw an exception here");
} catch (Exception mtseException) {
assertEquals("failed to execute MVEL code for state NULL:0.0.0:NULL:NULL",
@@ -122,7 +124,7 @@ public class MvelTaskSelectExecutorTest {
state.getTaskSelectionLogic().setLogic("executionId != -1");
try {
mtse.prepare();
- mtse.execute(-1, null, event);
+ mtse.execute(-1, new Properties(), event);
fail("test should throw an exception here");
} catch (Exception mtseException) {
assertEquals("execute-post: task selection logic failed on state \"NULL:0.0.0:NULL:NULL\"",
@@ -131,7 +133,7 @@ public class MvelTaskSelectExecutorTest {
try {
mtse.prepare();
- AxArtifactKey taskKey = mtse.execute(0, null, event);
+ AxArtifactKey taskKey = mtse.execute(0, new Properties(), event);
assertEquals("NULL:0.0.0", taskKey.getId());
mtse.cleanUp();
} catch (Exception mtseException) {