diff options
author | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2017-10-12 05:35:08 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-10-12 05:35:08 +0000 |
commit | 6fda60ab1b44f70348e8f9142b8d6ad5f9dd6a1d (patch) | |
tree | 1a07800d041be3d1fcb3ad167b5ebb516328ffd0 /bpmn/MSOCommonBPMN/src/test/java | |
parent | 9cebc7162dcb995f5cb47006a1d315abbc2abb73 (diff) | |
parent | 015b92c3d96fb42f80b018fdf8f639f1cf3298c3 (diff) |
Merge "Add junit test coverage and fix bugs in VCPE"
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/test/java')
-rw-r--r-- | bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java | 14 |
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());
|