diff options
author | Steve Smokowski <ss835w@att.com> | 2019-09-20 15:22:05 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-09-20 15:22:05 +0000 |
commit | 7e070b202cd8a109e7254854a23de33f91dc0522 (patch) | |
tree | edcbd7e11fc2278269d5d0dc165a654150308060 /bpmn/so-bpmn-tasks/src/test | |
parent | a2fd007e4d1b03f7258d71fa86658510ff2f1790 (diff) | |
parent | ae9a2bd01ae94f303d390fdb0673dba71b07fcb0 (diff) |
Merge "Exception string in checkRelationshipRelatedTo"
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/test')
-rw-r--r-- | bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBBTest.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBBTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBBTest.java index bacc57758b..ed55c56231 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBBTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBBTest.java @@ -40,9 +40,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion; import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network; import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; -import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB; import org.onap.so.client.aai.entities.AAIResultWrapper; -import org.springframework.beans.factory.annotation.Autowired; public class UnassignNetworkBBTest extends BaseTaskTest { @@ -84,6 +82,15 @@ public class UnassignNetworkBBTest extends BaseTaskTest { } @Test + public void checkRelationshipRelatedToUnassignNetworkExceptionTest() throws Exception { + String msg = "Cannot perform Unassign Network. Network is still related to vf-module"; + expectedException.expect(BpmnError.class); + doReturn(true).when(networkBBUtils).isRelationshipRelatedToExists(any(Optional.class), eq("vf-module")); + unassignNetworkBB.checkRelationshipRelatedTo(execution, "vf-module"); + assertEquals(execution.getVariable("ErrorUnassignNetworkBB"), msg); + } + + @Test public void getCloudSdncRegion25Test() throws Exception { CloudRegion cloudRegion = setCloudRegion(); cloudRegion.setCloudRegionVersion("2.5"); |