aboutsummaryrefslogtreecommitdiffstats
path: root/gui-editors/gui-editor-apex/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'gui-editors/gui-editor-apex/src/test')
-rw-r--r--gui-editors/gui-editor-apex/src/test/java/org/onap/policy/gui/editors/apex/rest/handling/ApexEditorRestResourceTest.java70
-rw-r--r--gui-editors/gui-editor-apex/src/test/resources/models/PolicyModel.json68
-rw-r--r--gui-editors/gui-editor-apex/src/test/resources/models/PolicyModel.yaml40
3 files changed, 0 insertions, 178 deletions
diff --git a/gui-editors/gui-editor-apex/src/test/java/org/onap/policy/gui/editors/apex/rest/handling/ApexEditorRestResourceTest.java b/gui-editors/gui-editor-apex/src/test/java/org/onap/policy/gui/editors/apex/rest/handling/ApexEditorRestResourceTest.java
index e5f24ff..90a9b4d 100644
--- a/gui-editors/gui-editor-apex/src/test/java/org/onap/policy/gui/editors/apex/rest/handling/ApexEditorRestResourceTest.java
+++ b/gui-editors/gui-editor-apex/src/test/java/org/onap/policy/gui/editors/apex/rest/handling/ApexEditorRestResourceTest.java
@@ -781,76 +781,6 @@ class ApexEditorRestResourceTest {
result = apexRequest(post(BASE_URL + "/Task/Create", sessionId)
.content(entityString).contentType(APPLICATION_JSON));
assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
-
- entityString = "{" + "\"name\" : \"HowsItGoing\"," + "\"version\" : \"0.0.2\","
- + "\"inputFields\" : {\"IField0\" : {\"name\" : \"StringType\", \"version\" : \"0.0.1\", "
- + "\"localName\" : \"IField0\", \"optional\" : false}},"
- + "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
- + "\"description\" : \"A description of hello\"" + "}";
- result = apexRequest(post(BASE_URL + "/Task/Create", sessionId)
- .content(entityString).contentType(APPLICATION_JSON));
- assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
-
- entityString = "{" + "\"name\" : \"Hi\"," + "\"version\" : \"0.0.2\","
- + "\"inputFields\" : {\"IField0\" : null},"
- + "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
- + "\"description\" : \"A description of hello\"" + "}";
- result = apexRequest(post(BASE_URL + "/Task/Create", sessionId)
- .content(entityString).contentType(APPLICATION_JSON));
- assertEquals(ApexApiResult.Result.FAILED, result.getResult());
-
- entityString = "{" + "\"name\" : \"GoodDay\"," + "\"version\" : \"0.0.2\","
- + "\"inputFields\" : {\"IField0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\", "
- + "\"localName\" : \"IField0\", \"optional\" : false}},"
- + "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
- + "\"description\" : \"A description of hello\"" + "}";
- result = apexRequest(post(BASE_URL + "/Task/Create", sessionId)
- .content(entityString).contentType(APPLICATION_JSON));
- assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
-
- entityString = "{" + "\"name\" : \"Howdy\"," + "\"version\" : \"0.0.2\","
- + "\"inputFields\" : {\"IField0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\", "
- + "\"localName\" : \"NotIField0\", \"optional\" : false}},"
- + "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
- + "\"description\" : \"A description of hello\"" + "}";
- result = apexRequest(post(BASE_URL + "/Task/Create", sessionId)
- .content(entityString).contentType(APPLICATION_JSON));
- assertEquals(ApexApiResult.Result.FAILED, result.getResult());
-
- entityString = "{" + "\"name\" : \"HowsItGoing2\"," + "\"version\" : \"0.0.2\","
- + "\"outputFields\" : {\"OField0\" : {\"name\" : \"StringType\", \"version\" : \"0.0.1\", "
- + "\"localName\" : \"OField0\", \"optional\" : false}},"
- + "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
- + "\"description\" : \"A description of hello\"" + "}";
- result = apexRequest(post(BASE_URL + "/Task/Create", sessionId)
- .content(entityString).contentType(APPLICATION_JSON));
- assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
-
- entityString = "{" + "\"name\" : \"Hi2\"," + "\"version\" : \"0.0.2\","
- + "\"outputFields\" : {\"OField0\" : null},"
- + "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
- + "\"description\" : \"A description of hello\"" + "}";
- result = apexRequest(post(BASE_URL + "/Task/Create", sessionId)
- .content(entityString).contentType(APPLICATION_JSON));
- assertEquals(ApexApiResult.Result.FAILED, result.getResult());
-
- entityString = "{" + "\"name\" : \"GoodDay2\"," + "\"version\" : \"0.0.2\","
- + "\"outputFields\" : {\"OField0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\","
- + " \"localName\" : \"OField0\", \"optional\" : false}},"
- + "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
- + "\"description\" : \"A description of hello\"" + "}";
- result = apexRequest(post(BASE_URL + "/Task/Create", sessionId)
- .content(entityString).contentType(APPLICATION_JSON));
- assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
-
- entityString = "{" + "\"name\" : \"Howdy2\"," + "\"version\" : \"0.0.2\","
- + "\"outputFields\" : {\"OField0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\", "
- + "\"localName\" : \"NotOField0\", \"optional\" : false}},"
- + "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\","
- + "\"description\" : \"A description of hello\"" + "}";
- result = apexRequest(post(BASE_URL + "/Task/Create", sessionId)
- .content(entityString).contentType(APPLICATION_JSON));
- assertEquals(ApexApiResult.Result.FAILED, result.getResult());
}
@Test
diff --git a/gui-editors/gui-editor-apex/src/test/resources/models/PolicyModel.json b/gui-editors/gui-editor-apex/src/test/resources/models/PolicyModel.json
index 9e3ea51..096e64a 100644
--- a/gui-editors/gui-editor-apex/src/test/resources/models/PolicyModel.json
+++ b/gui-editors/gui-editor-apex/src/test/resources/models/PolicyModel.json
@@ -439,74 +439,6 @@
"name": "task",
"version": "0.0.1"
},
- "inputFields": {
- "entry": [
- {
- "key": "IEPAR0",
- "value": {
- "key": "IEPAR0",
- "fieldSchemaKey": {
- "name": "eventContextItem0",
- "version": "0.0.1"
- }
- }
- },
- {
- "key": "IEPAR1",
- "value": {
- "key": "IEPAR1",
- "fieldSchemaKey": {
- "name": "eventContextItem1",
- "version": "0.0.1"
- }
- }
- }
- ]
- },
- "outputFields": {
- "entry": [
- {
- "key": "OE0PAR0",
- "value": {
- "key": "OE0PAR0",
- "fieldSchemaKey": {
- "name": "eventContextItem0",
- "version": "0.0.1"
- }
- }
- },
- {
- "key": "OE0PAR1",
- "value": {
- "key": "OE0PAR1",
- "fieldSchemaKey": {
- "name": "eventContextItem1",
- "version": "0.0.1"
- }
- }
- },
- {
- "key": "OE1PAR0",
- "value": {
- "key": "OE1PAR0",
- "fieldSchemaKey": {
- "name": "eventContextItem0",
- "version": "0.0.1"
- }
- }
- },
- {
- "key": "OE1PAR1",
- "value": {
- "key": "OE1PAR1",
- "fieldSchemaKey": {
- "name": "eventContextItem1",
- "version": "0.0.1"
- }
- }
- }
- ]
- },
"taskParameters": {
"entry": [
{
diff --git a/gui-editors/gui-editor-apex/src/test/resources/models/PolicyModel.yaml b/gui-editors/gui-editor-apex/src/test/resources/models/PolicyModel.yaml
index 201085c..54bb592 100644
--- a/gui-editors/gui-editor-apex/src/test/resources/models/PolicyModel.yaml
+++ b/gui-editors/gui-editor-apex/src/test/resources/models/PolicyModel.yaml
@@ -307,46 +307,6 @@ topology_template:
key:
name: task
version: 0.0.1
- inputFields:
- entry:
- - key: IEPAR0
- value:
- key: IEPAR0
- fieldSchemaKey:
- name: eventContextItem0
- version: 0.0.1
- - key: IEPAR1
- value:
- key: IEPAR1
- fieldSchemaKey:
- name: eventContextItem1
- version: 0.0.1
- outputFields:
- entry:
- - key: OE0PAR0
- value:
- key: OE0PAR0
- fieldSchemaKey:
- name: eventContextItem0
- version: 0.0.1
- - key: OE0PAR1
- value:
- key: OE0PAR1
- fieldSchemaKey:
- name: eventContextItem1
- version: 0.0.1
- - key: OE1PAR0
- value:
- key: OE1PAR0
- fieldSchemaKey:
- name: eventContextItem0
- version: 0.0.1
- - key: OE1PAR1
- value:
- key: OE1PAR1
- fieldSchemaKey:
- name: eventContextItem1
- version: 0.0.1
taskParameters:
entry:
- key: taskParameter0