summaryrefslogtreecommitdiffstats
path: root/testsuites/integration/integration-common/src/main/resources
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites/integration/integration-common/src/main/resources')
-rw-r--r--testsuites/integration/integration-common/src/main/resources/examples/models/JMS/JMSTestModel.json2
-rw-r--r--testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/DefaultStateLogic.javascript7
-rw-r--r--testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/DefaultTaskLogic.javascript9
-rw-r--r--testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/EvalStateLogic.javascript3
-rw-r--r--testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/EvalTaskLogic.javascript7
5 files changed, 16 insertions, 12 deletions
diff --git a/testsuites/integration/integration-common/src/main/resources/examples/models/JMS/JMSTestModel.json b/testsuites/integration/integration-common/src/main/resources/examples/models/JMS/JMSTestModel.json
index 02365bcdb..78c8110b9 100644
--- a/testsuites/integration/integration-common/src/main/resources/examples/models/JMS/JMSTestModel.json
+++ b/testsuites/integration/integration-common/src/main/resources/examples/models/JMS/JMSTestModel.json
@@ -342,7 +342,7 @@
"taskLogic": {
"key": "TaskLogic",
"logicFlavour": "JAVASCRIPT",
- "logic": "var outFieldType = Java.type(\"org.onap.policy.apex.testsuites.integration.common.testclasses.PingTestClass\");\nvar outValue = new outFieldType();\n\nvar inValue = executor.inFields.get(\"PingTestClass\");\n\nexecutor.logger.info(inValue);\n\noutValue.setPingTime(inValue.getPingTime());\noutValue.setPongTime(new Date().getTime());\noutValue.setName(inValue.getName() + \"_out\");\n\noutValue.setDescription(\ninValue.getDescription() +\n\". So Romeo would, were he not Romeo call'd,\" +\n\" retain that dear perfection which he owes, without that title.\");\n\nexecutor.logger.info(outValue);\nexecutor.outFields.put(\"PingTestClass\", outValue)\n\nvar returnValueType = Java.type(\"java.lang.Boolean\");\nvar returnValue = new returnValueType(true);"
+ "logic": "var outFieldType = Java.type(\"org.onap.policy.apex.testsuites.integration.common.testclasses.PingTestClass\");\nvar outValue = new outFieldType();\n\nvar inValue = executor.inFields.get(\"PingTestClass\");\n\nexecutor.logger.info(inValue.toString());\n\noutValue.setPingTime(inValue.getPingTime());\noutValue.setPongTime(new Date().getTime());\noutValue.setName(inValue.getName() + \"_out\");\n\noutValue.setDescription(\ninValue.getDescription() +\n\". So Romeo would, were he not Romeo call'd,\" +\n\" retain that dear perfection which he owes, without that title.\");\n\nexecutor.logger.info(outValue.toString();\nexecutor.outFields.put(\"PingTestClass\", outValue)\n\nvar returnValueType = Java.type(\"java.lang.Boolean\");\nvar returnValue = new returnValueType(true);"
}
}
}
diff --git a/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/DefaultStateLogic.javascript b/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/DefaultStateLogic.javascript
index e25cb9c6e..a3f1525d0 100644
--- a/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/DefaultStateLogic.javascript
+++ b/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/DefaultStateLogic.javascript
@@ -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.
@@ -18,10 +19,10 @@
* ============LICENSE_END=========================================================
*/
-executor.logger.debug(executor.subject.id);
+executor.logger.debug(executor.subject.getId());
var gc = executor.getContextAlbum("GlobalContextAlbum");
-executor.logger.debug(gc.name);
-executor.subject.defaultTaskKey.copyTo(executor.selectedTask)
+executor.logger.debug(gc.getName());
+executor.getSubject().getDefaultTaskKey().copyTo(executor.selectedTask);
var returnValue = executor.isTrue;
diff --git a/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/DefaultTaskLogic.javascript b/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/DefaultTaskLogic.javascript
index 158e49eea..36fd2c4a2 100644
--- a/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/DefaultTaskLogic.javascript
+++ b/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/DefaultTaskLogic.javascript
@@ -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.
@@ -18,15 +19,15 @@
* ============LICENSE_END=========================================================
*/
-executor.logger.debug(executor.subject.id);
+executor.logger.debug(executor.subject.getId());
var gc = executor.getContextAlbum("GlobalContextAlbum");
-executor.logger.debug(gc.name);
-executor.logger.debug(executor.inFields);
+executor.logger.debug(gc.getName());
+executor.logger.debug(executor.inFields.get("TestSlogan"));
var caseSelectedType = Java.type("java.lang.Byte");
executor.outFields.put("Test<STATE_NAME>CaseSelected", new caseSelectedType(<RANDOM_BYTE_VALUE>));
executor.outFields.put("Test<STATE_NAME>StateTime", java.lang.System.nanoTime());
-executor.logger.debug(executor.eo);
+executor.logger.debug(executor.inFields.get("TestSlogan"));
var returnValue = executor.isTrue;
diff --git a/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/EvalStateLogic.javascript b/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/EvalStateLogic.javascript
index 535cad595..5ee2a0448 100644
--- a/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/EvalStateLogic.javascript
+++ b/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/EvalStateLogic.javascript
@@ -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.
@@ -18,7 +19,7 @@
* ============LICENSE_END=========================================================
*/
-executor.logger.debug(executor.subject.id);
+executor.logger.debug(executor.subject.getId());
executor.subject.defaultTaskKey.copyTo(executor.selectedTask);
var returnValue = executor.isTrue;
diff --git a/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/EvalTaskLogic.javascript b/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/EvalTaskLogic.javascript
index efbe5cb4d..b29e96fcf 100644
--- a/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/EvalTaskLogic.javascript
+++ b/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/testsuites/integration/common/model/javascript/EvalTaskLogic.javascript
@@ -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.
@@ -18,10 +19,10 @@
* ============LICENSE_END=========================================================
*/
-executor.logger.debug(executor.subject.id);
-executor.logger.debug(executor.inFields);
+executor.logger.debug(executor.subject.getId());
+executor.logger.debug(executor.inFields.get("name"));
executor.outFields.put("State<STATE_NUMBER>Timestamp", java.lang.System.nanoTime());
-executor.logger.debug(executor.outFields);
+executor.logger.debug(executor.outFields.get("name"));
var returnValue = executor.isTrue;