summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-building-blocks/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/so-bpmn-building-blocks/src/test')
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java4
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVnfBBTest.java2
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/HomingBBTest.java17
3 files changed, 10 insertions, 13 deletions
diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java
index 2a0fef0caa..5ef4d7ea98 100644
--- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java
+++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java
@@ -34,7 +34,7 @@ import org.junit.After;
import org.junit.Before;
import org.junit.runner.RunWith;
import org.onap.so.TestApplication;
-import org.onap.so.bpmn.buildingblock.SniroHomingV2;
+import org.onap.so.bpmn.buildingblock.HomingV2;
import org.onap.so.bpmn.common.DelegateExecutionImpl;
import org.onap.so.bpmn.common.validation.BuildingBlockValidatorRunner;
import org.onap.so.bpmn.infrastructure.aai.tasks.AAICommonTasks;
@@ -230,7 +230,7 @@ public abstract class BaseBPMNTest {
protected SDNCClient sdncClient;
@MockBean
- protected SniroHomingV2 sniroHoming;
+ protected HomingV2 homing;
@MockBean
protected NamingServiceDeleteTasks namingServiceDeleteTasks;
diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVnfBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVnfBBTest.java
index 9943e39ef6..f46331fdd4 100644
--- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVnfBBTest.java
+++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVnfBBTest.java
@@ -33,7 +33,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution;
public class AssignVnfBBTest extends BaseBPMNTest {
@Test
public void sunnyDayAssignVnfBBTest() throws InterruptedException, IOException {
- variables.put("callHoming", true);
+ variables.put("homing", true);
mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub");
ProcessInstance pi = runtimeService.startProcessInstanceByKey("AssignVnfBB", variables);
assertThat(pi).isNotNull();
diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/HomingBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/HomingBBTest.java
index f1bb1462d6..bca4d3a979 100644
--- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/HomingBBTest.java
+++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/HomingBBTest.java
@@ -25,12 +25,9 @@ import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doThrow;
import org.camunda.bpm.engine.delegate.BpmnError;
import org.camunda.bpm.engine.runtime.ProcessInstance;
-import org.junit.Ignore;
import org.junit.Test;
import org.onap.so.bpmn.BaseBPMNTest;
-import org.onap.so.bpmn.buildingblock.SniroHomingV2;
import org.onap.so.bpmn.common.BuildingBlockExecution;
-import org.springframework.boot.test.mock.mockito.MockBean;
public class HomingBBTest extends BaseBPMNTest {
@@ -40,28 +37,28 @@ public class HomingBBTest extends BaseBPMNTest {
mockSubprocess("ReceiveWorkflowMessage", "Mock ReceiveWorkflowMessage", "GenericStub");
ProcessInstance pi = runtimeService.startProcessInstanceByKey("HomingBB", variables);
assertThat(pi).isNotNull();
- assertThat(pi).isStarted().hasPassedInOrder("start", "sniroOofCheck", "callSniro", "ExclusiveGateway_1ckp059",
- "receiveAsyncCallback", "sniroOofCheck2", "processSniroSolution", "ExclusiveGateway_1kvzxpb", "end");
+ assertThat(pi).isStarted().hasPassedInOrder("start", "callHoming", "receiveAsyncCallback",
+ "processHomingSolution", "end");
assertThat(pi).isEnded();
}
@Test
public void testHomingV2_error_bpmnError() {
- doThrow(new BpmnError("MSOWorkflowException")).when(sniroHoming).callSniro(any(BuildingBlockExecution.class));
+ doThrow(new BpmnError("MSOWorkflowException")).when(homing).callHoming(any(BuildingBlockExecution.class));
ProcessInstance pi = runtimeService.startProcessInstanceByKey("HomingBB", variables);
assertThat(pi).isNotNull();
- assertThat(pi).isStarted().hasPassed("start", "sniroOofCheck", "startBpmnError", "bpmnErrorSubprocess",
+ assertThat(pi).isStarted().hasPassed("start", "callHoming", "startBpmnError", "bpmnErrorSubprocess",
"processMsoWorkflowException", "endBpmnError").hasNotPassed("callReceiveAsync");
assertThat(pi).isEnded();
}
@Test
public void testHomingV2_error_javaException() {
- doThrow(new RuntimeException("Test")).when(sniroHoming).callSniro(any(BuildingBlockExecution.class));
+ doThrow(new RuntimeException("Test")).when(homing).callHoming(any(BuildingBlockExecution.class));
ProcessInstance pi = runtimeService.startProcessInstanceByKey("HomingBB", variables);
assertThat(pi).isNotNull();
- assertThat(pi).isStarted().hasPassed("start", "sniroOofCheck", "callSniro", "startJavaError",
- "processJavaException", "javaExceptionSubProcess", "endJavaError").hasNotPassed("callReceiveAsync");
+ assertThat(pi).isStarted().hasPassed("start", "callHoming", "startJavaError", "processJavaException",
+ "javaExceptionSubProcess", "endJavaError").hasNotPassed("callReceiveAsync");
assertThat(pi).isEnded();
}