aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOInfrastructureBPMN/src/test/groovy
diff options
context:
space:
mode:
authorseshukm <seshu.kumar.m@huawei.com>2017-10-28 15:24:12 +0530
committerseshukm <seshu.kumar.m@huawei.com>2017-10-28 15:24:12 +0530
commit217c9cb0f7d125153acd7bcd0abfd77fbceaf360 (patch)
treea451c12003ae8e9c8cec861b44c40bfd52dd5e5e /bpmn/MSOInfrastructureBPMN/src/test/groovy
parent00f0a8c1f0fbee5e58ed208ee49b57e627fccef7 (diff)
Add sendSyncError to groovy test
IssueId: SO-281 Change-Id: I22ff6b3bafc8d76a635ed4bd03e0088fbace5a1f Signed-off-by: seshukm <seshu.kumar.m@huawei.com>
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src/test/groovy')
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateGenericAlaCarteServiceInstanceTest.groovy22
1 files changed, 22 insertions, 0 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateGenericAlaCarteServiceInstanceTest.groovy b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateGenericAlaCarteServiceInstanceTest.groovy
index 0b7617f00f..6d2d25ae85 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateGenericAlaCarteServiceInstanceTest.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateGenericAlaCarteServiceInstanceTest.groovy
@@ -230,7 +230,29 @@ class CreateGenericAlaCarteServiceInstanceTest {
//ignore
}
}
+
+ @Test
+ //@Ignore
+ public void sendSyncError() {
+ println "************ sendSyncError ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("isAsyncProcess")).thenReturn(true)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ try{
+ CreateNetworkInstance CreateNetworkInstance = new CreateNetworkInstance()
+ CreateNetworkInstance.sendSyncError(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable("CreateNetworkInstanceResponseCode", "500")
+ }catch(Exception e){
+ //ignore
+ }
+ }
+
private ExecutionEntity setupMock() {
ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)