aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/test
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2017-10-11 11:49:51 -0400
committerJim Hahn <jrh3@att.com>2017-10-11 11:49:51 -0400
commit015b92c3d96fb42f80b018fdf8f639f1cf3298c3 (patch)
treef96f2e944d456809702041bc9f9ef653ba061216 /bpmn/MSOCommonBPMN/src/test
parentf86960874497f005079c9e595b5e9e2eb0a815d1 (diff)
Add junit test coverage and fix bugs in VCPE
Added additional junit tests for VCPE and fixed bugs that were found while testing. Change-Id: Icb6a0c936a16b775ff553c11cb07a4348bd9ebfc Issue-ID: SO-210 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/test')
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java
index 9057904da3..f60d984a6d 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java
@@ -21,6 +21,9 @@
package org.openecomp.mso.bpmn.common;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.doAnswer;
@@ -77,7 +80,18 @@ public class BPMNUtil {
.getValue();
return (T) responseData;
}
+
+
+ public static void assertAnyProcessInstanceFinished(ProcessEngineServices processEngineServices, String processDefinitionID) {
+ String pID = getProcessInstanceId(processEngineServices,
+ processDefinitionID);
+ assertNotNull(pID);
+ assertTrue(processEngineServices.getHistoryService().createHistoricProcessInstanceQuery().processInstanceId(pID).finished().count() > 0);
+ }
+ public static void assertNoProcessInstance(ProcessEngineServices processEngineServices, String processDefinitionID) {
+ assertNull(getProcessInstanceId(processEngineServices, processDefinitionID));
+ }
public static void assertProcessInstanceFinished(ProcessEngineServices processEngineServices, String pid) {
assertEquals(1, processEngineServices.getHistoryService().createHistoricProcessInstanceQuery().processInstanceId(pid).finished().count());