diff options
author | Rob Daugherty <rd472p@att.com> | 2018-08-23 13:51:56 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-08-23 13:51:56 +0000 |
commit | 75e6db4f5394f66782efd5f233d6c7ee719f61b5 (patch) | |
tree | f28a5c7b04a0e2740978f710e5cc49fab236a271 /bpmn/so-bpmn-tasks/src/test/java/org | |
parent | e818e8af4718a1351f5affe02c9b7d57583d563b (diff) | |
parent | ce28fc9159d0d554ef06fdd1f6e1f4c0918ad269 (diff) |
Merge "Prod fixes August 18th"
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/test/java/org')
3 files changed, 31 insertions, 1 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 c9433a6212..b45752957e 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 @@ -204,11 +204,13 @@ public class AAIUpdateTasksTest extends BaseTaskTest{ @Test public void updateHeatStackIdVfModuleTest() throws Exception { + execution.setVariable("heatStackId", "newHeatStackId"); doNothing().when(aaiVfModuleResources).updateHeatStackIdVfModule(vfModule, genericVnf); aaiUpdateTasks.updateHeatStackIdVfModule(execution); verify(aaiVfModuleResources, times(1)).updateHeatStackIdVfModule(vfModule, genericVnf); + assertEquals("newHeatStackId", vfModule.getHeatStackId()); } @Test @@ -270,11 +272,13 @@ public class AAIUpdateTasksTest extends BaseTaskTest{ } @Test public void updateHeatStackIdVolumeGroupTest() throws Exception { + execution.setVariable("heatStackId", "newHeatStackId"); doNothing().when(aaiVolumeGroupResources).updateHeatStackIdVolumeGroup(volumeGroup, cloudRegion); aaiUpdateTasks.updateHeatStackIdVolumeGroup(execution); verify(aaiVolumeGroupResources, times(1)).updateHeatStackIdVolumeGroup(volumeGroup, cloudRegion); + assertEquals("newHeatStackId", volumeGroup.getHeatStackId()); } @Test diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java index 8de32eaba1..3869988c40 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java @@ -778,7 +778,7 @@ public class WorkflowActionTest extends BaseTaskTest { assertEquals(UUID.randomUUID().toString().length(),ebbs.get(14).getWorkflowResourceIds().getVnfId().length()); assertEquals(ebbs.get(15).getBuildingBlock().getBpmnFlowName(),"ActivateServiceInstanceBB"); assertEquals(3,ebbs.get(0).getWorkflowResourceIds().getServiceInstanceId().length()); - + assertEquals(true, execution.getVariable("homing")); } @Test diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java index 6edda44c0a..c3b0048e07 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java @@ -245,6 +245,32 @@ public class AAIObjectMapperTest{ assertThat(reqMapper1, sameBeanAs(AAIVfModule)); } + + @Test + public void vfModuleBaseMap() throws Exception { + VfModule vfModule = new VfModule(); + vfModule.setVfModuleId("a"); + vfModule.setVfModuleName("b"); + vfModule.setOrchestrationStatus(OrchestrationStatus.ASSIGNED); + ModelInfoVfModule modelInfoVfModule = new ModelInfoVfModule(); + modelInfoVfModule.setModelCustomizationUUID("f"); + modelInfoVfModule.setModelInvariantUUID("g"); + modelInfoVfModule.setModelUUID("h"); + modelInfoVfModule.setIsBaseBoolean(true); + vfModule.setModelInfoVfModule(modelInfoVfModule); + + org.onap.aai.domain.yang.VfModule AAIVfModule = aaiObjectMapper.mapVfModule(vfModule); + + String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "aaiVfModuleBaseMap.json"))); + + ObjectMapper omapper = new ObjectMapper(); + org.onap.aai.domain.yang.VfModule reqMapper1 = omapper.readValue( + jsonToCompare, + org.onap.aai.domain.yang.VfModule.class); + + assertThat(reqMapper1, sameBeanAs(AAIVfModule)); + + } @Test public void testMapInstanceGroup() { |