diff options
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/test')
2 files changed, 40 insertions, 2 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 e5b003a437..a7dfe7f7a4 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 @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (c) 2020 Tech Mahindra + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -753,4 +755,40 @@ public class AAIUpdateTasksTest extends BaseTaskTest { when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.PNF))).thenReturn(pnf); return pnf; } + + @Test + public void updateOrchestrationStatusVnfConfigAssignedTest() throws Exception { + doNothing().when(aaiVnfResources).updateOrchestrationStatusVnf(genericVnf, OrchestrationStatus.CONFIGASSIGNED); + + aaiUpdateTasks.updateOrchestrationStatus(execution, "vnf", "config-assign"); + + verify(aaiVnfResources, times(1)).updateOrchestrationStatusVnf(genericVnf, OrchestrationStatus.CONFIGASSIGNED); + } + + @Test + public void updateOrchestrationStatusVnfConfigDeployedTest() throws Exception { + doNothing().when(aaiVnfResources).updateOrchestrationStatusVnf(genericVnf, OrchestrationStatus.CONFIGDEPLOYED); + + aaiUpdateTasks.updateOrchestrationStatus(execution, "vnf", "config-deploy"); + + verify(aaiVnfResources, times(1)).updateOrchestrationStatusVnf(genericVnf, OrchestrationStatus.CONFIGDEPLOYED); + } + + @Test + public void updateOrchestrationStatusVfModuleConfigDeployedTest() throws Exception { + doNothing().when(aaiVfModuleResources).updateOrchestrationStatusVfModule(vfModule, genericVnf, + OrchestrationStatus.CONFIGDEPLOYED); + aaiUpdateTasks.updateOrchestrationStatus(execution, "vfmodule", "config-deploy"); + verify(aaiVfModuleResources, times(1)).updateOrchestrationStatusVfModule(vfModule, genericVnf, + OrchestrationStatus.CONFIGDEPLOYED); + } + + @Test + public void updateOrchestrationStatusVfModuleConfigAssignedTest() throws Exception { + doNothing().when(aaiVfModuleResources).updateOrchestrationStatusVfModule(vfModule, genericVnf, + OrchestrationStatus.CONFIGASSIGNED); + aaiUpdateTasks.updateOrchestrationStatus(execution, "vfmodule", "config-assign"); + verify(aaiVfModuleResources, times(1)).updateOrchestrationStatusVfModule(vfModule, genericVnf, + OrchestrationStatus.CONFIGASSIGNED); + } } diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ControllerExecutionTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ControllerExecutionTest.java index 72a987c395..f35939ec39 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ControllerExecutionTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ControllerExecutionTest.java @@ -99,7 +99,7 @@ public class ControllerExecutionTest extends BaseTaskTest { controllerExecution.setControllerActorScopeAction(execution); assertEquals(TEST_SCOPE, execution.getVariable("scope")); assertEquals(TEST_ACTION, execution.getVariable("action")); - assertEquals(TEST_CONTROLLER_ACTOR, execution.getVariable("controllerActor")); + assertEquals(TEST_CONTROLLER_ACTOR, execution.getVariable("actor")); } @@ -114,7 +114,7 @@ public class ControllerExecutionTest extends BaseTaskTest { bbNameSelectionReference.setScope(TEST_SCOPE); doReturn(bbNameSelectionReference).when(catalogDbClient).getBBNameSelectionReference(TEST_CONTROLLER_ACTOR, TEST_SCOPE, TEST_ACTION); - execution.setVariable("controllerActor", TEST_CONTROLLER_ACTOR); + execution.setVariable("actor", TEST_CONTROLLER_ACTOR); execution.setVariable("scope", TEST_SCOPE); execution.setVariable("action", TEST_ACTION); |