summaryrefslogtreecommitdiffstats
path: root/sdc-workflow-designer-server/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'sdc-workflow-designer-server/src/test')
-rw-r--r--sdc-workflow-designer-server/src/test/java/org/onap/sdc/workflowdesigner/resources/ExtendActivityResourceTest.java6
-rw-r--r--sdc-workflow-designer-server/src/test/java/org/onap/sdc/workflowdesigner/resources/WorkflowModelerResourceTest.java23
-rw-r--r--sdc-workflow-designer-server/src/test/java/org/onap/sdc/workflowdesigner/resources/entity/ExtendActivityTest.java2
3 files changed, 16 insertions, 15 deletions
diff --git a/sdc-workflow-designer-server/src/test/java/org/onap/sdc/workflowdesigner/resources/ExtendActivityResourceTest.java b/sdc-workflow-designer-server/src/test/java/org/onap/sdc/workflowdesigner/resources/ExtendActivityResourceTest.java
index 899e2ee9..fcb71360 100644
--- a/sdc-workflow-designer-server/src/test/java/org/onap/sdc/workflowdesigner/resources/ExtendActivityResourceTest.java
+++ b/sdc-workflow-designer-server/src/test/java/org/onap/sdc/workflowdesigner/resources/ExtendActivityResourceTest.java
@@ -16,7 +16,7 @@ import static org.junit.Assert.assertEquals;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import org.onap.sdc.workflowdesigner.resources.entity.ExtendActivity;
+import org.onap.sdc.workflowdesigner.resources.entity.ExtActivity;
import org.onap.sdc.workflowdesigner.utils.FileCommonUtils;
import org.onap.sdc.workflowdesigner.utils.JsonUtils;
@@ -39,13 +39,13 @@ public class ExtendActivityResourceTest {
public void tearDown() throws Exception {}
/**
- * Test method for {@link org.onap.sdc.workflowdesigner.resources.ExtendActivityResource#retriveExtActivites(java.lang.String)}.
+ *
*/
@Test
public void testRetriveExtActivites() {
try {
String json = FileCommonUtils.readString(EXT_ACTIVITIES_FILE_NAME);
- ExtendActivity[] extActivities = JsonUtils.fromJson(json, ExtendActivity[].class);
+ ExtActivity[] extActivities = JsonUtils.fromJson(json, ExtActivity[].class);
FileCommonUtils.write("test.json", JsonUtils.toJson(extActivities));
assertEquals(extActivities.length == 0, false);
diff --git a/sdc-workflow-designer-server/src/test/java/org/onap/sdc/workflowdesigner/resources/WorkflowModelerResourceTest.java b/sdc-workflow-designer-server/src/test/java/org/onap/sdc/workflowdesigner/resources/WorkflowModelerResourceTest.java
index a67adbeb..ba399644 100644
--- a/sdc-workflow-designer-server/src/test/java/org/onap/sdc/workflowdesigner/resources/WorkflowModelerResourceTest.java
+++ b/sdc-workflow-designer-server/src/test/java/org/onap/sdc/workflowdesigner/resources/WorkflowModelerResourceTest.java
@@ -45,7 +45,8 @@ public class WorkflowModelerResourceTest {
public void tearDown() throws Exception {}
/**
- * Test method for {@link org.onap.sdc.workflowdesigner.resources.WorkflowModelerResource#buildBPMN(java.net.URI, java.lang.String)}.
+ * Test method for
+ * {@link org.onap.sdc.workflowdesigner.resources.WorkflowModelerResource#buildBPMN(java.net.URI, java.lang.String)}.
*/
@Test
public void testBuildBPMN() {
@@ -65,25 +66,25 @@ public class WorkflowModelerResourceTest {
} catch (IOException e) {
} catch (Exception e) {
}
-// return null;
- // TODO for Nexus-IQ
- return " ";
+
+ return null;
}
-
+
/**
- * Test method for {@link org.onap.sdc.workflowdesigner.resources.WorkflowModelerResource#insertJson2Bpmn(java.lang.String, java.lang.String)}.
+ * Test method for
+ * {@link org.onap.sdc.workflowdesigner.resources.WorkflowModelerResource#insertJson2Bpmn(java.lang.String, java.lang.String)}.
*/
@Test
public void testInsertJson2Bpmn() {
String bpmn = parseBpmnfromJsonFile();
-
+
try {
String json = FileCommonUtils.readString("src/main/assembly/" + WORKFLOW_JSON_TEMP_FILE_NAME);
WorkflowModelerResource resource = new WorkflowModelerResource();
String combineBpmn = resource.insertJson2Bpmn(json, bpmn);
- String json1 = resource.readJsonfromBPMNFile(combineBpmn);
-
+ String json1 = resource.readJsonfromBPMN(combineBpmn);
+
assertEqualsJson(json, json1);
} catch (IOException e) {
} catch (DocumentException e) {
@@ -97,12 +98,12 @@ public class WorkflowModelerResourceTest {
private void assertEqualsJson(String json, String json1) {
WorkflowInfo wi = JsonUtils.fromJson(json, WorkflowInfo.class);
WorkflowInfo wi1 = JsonUtils.fromJson(json1, WorkflowInfo.class);
-
+
String newJson = JsonUtils.toJson(wi);
String newJson1 = JsonUtils.toJson(wi1);
assertEquals(newJson1, newJson);
-
+
}
}
diff --git a/sdc-workflow-designer-server/src/test/java/org/onap/sdc/workflowdesigner/resources/entity/ExtendActivityTest.java b/sdc-workflow-designer-server/src/test/java/org/onap/sdc/workflowdesigner/resources/entity/ExtendActivityTest.java
index e8fa1e75..0c16807a 100644
--- a/sdc-workflow-designer-server/src/test/java/org/onap/sdc/workflowdesigner/resources/entity/ExtendActivityTest.java
+++ b/sdc-workflow-designer-server/src/test/java/org/onap/sdc/workflowdesigner/resources/entity/ExtendActivityTest.java
@@ -43,7 +43,7 @@ public class ExtendActivityTest {
IconData icon = new IconData();
Content content = new Content();
- ExtendActivity ea = new ExtendActivity();
+ ExtActivity ea = new ExtActivity();
ea.setContent(content);
ea.setDescription(description);
ea.setDisplayName(displayName);