diff options
author | mharazin <mateusz.harazin@nokia.com> | 2020-02-05 12:39:16 +0100 |
---|---|---|
committer | mharazin <mateusz.harazin@nokia.com> | 2020-02-07 11:30:12 +0100 |
commit | 388ece287dc341d2b1a34a86b3469476eff3cd29 (patch) | |
tree | fab30889e275f167d45f963303b7ba53254165ce /bpmn/so-bpmn-tasks/src/test/java/org/onap | |
parent | e3871f1bd6e8d8c8baa093d1307b029527603302 (diff) |
AssignPnfBB - set orchestration status to Assigned after successful assignment
Issue-ID: SO-2642
Signed-off-by: Mateusz Harazin <mateusz.harazin@nokia.com>
Change-Id: I4247e464b1533025638880763ea9e2fe629b10c3
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/test/java/org/onap')
-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 { |