diff options
author | Lukasz Muszkieta <lukasz.muszkieta@nokia.com> | 2020-02-07 11:27:16 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-02-07 11:27:16 +0000 |
commit | 092c43b8a222fe987084c4a103b3e1e888ff7550 (patch) | |
tree | c46949c99c2f683ac6ae46cbfb6477130215d1f5 /bpmn/so-bpmn-tasks/src/test/java/org | |
parent | 2110c52f8c84cd9330da668a43e00e34f645f867 (diff) | |
parent | 388ece287dc341d2b1a34a86b3469476eff3cd29 (diff) |
Merge "AssignPnfBB - set orchestration status to Assigned after successful assignment"
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/test/java/org')
-rw-r--r-- | bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java index 19877aae16..e26009a1de 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java @@ -139,6 +139,25 @@ public class AAIUpdateTasksTest extends BaseTaskTest { aaiUpdateTasks.updateOrchestrationStatusActiveService(execution); } + @Test + public void updateOrchestrationStatusAssignedPnfTest() throws Exception { + Pnf pnf = preparePnfAndExtractForPnf(); + doNothing().when(aaiPnfResources).updateOrchestrationStatusPnf(pnf, OrchestrationStatus.ASSIGNED); + + aaiUpdateTasks.updateOrchestrationStatusAssignedPnf(execution); + + verify(aaiPnfResources, times(1)).updateOrchestrationStatusPnf(pnf, OrchestrationStatus.ASSIGNED); + } + + @Test + public void updateOrchestrationStatusAssignedPnfExceptionTest() throws Exception { + Pnf pnf = preparePnfAndExtractForPnf(); + doThrow(RuntimeException.class).when(aaiPnfResources).updateOrchestrationStatusPnf(pnf, + OrchestrationStatus.ASSIGNED); + + expectedException.expect(BpmnError.class); + aaiUpdateTasks.updateOrchestrationStatusAssignedPnf(execution); + } @Test public void updateOrchestrationStatusActivePnfTest() throws Exception { |