From a7b1f9beb7db0c03915b4a69f9a4ddff6dd7c414 Mon Sep 17 00:00:00 2001 From: MichaelMorris Date: Mon, 30 Aug 2021 12:28:05 +0100 Subject: Fix mismatch in requirement name in sub mapping Signed-off-by: MichaelMorris Issue-ID: SDC-3701 Change-Id: I0898d8b16c6e5cda035f33024f26644d7c6b1ef5 --- .../org/openecomp/sdc/be/tosca/ToscaExportHandlerTest.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'catalog-be/src/test/java/org') diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaExportHandlerTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaExportHandlerTest.java index 325a003133..d9fc8de623 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaExportHandlerTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaExportHandlerTest.java @@ -1409,14 +1409,14 @@ public class ToscaExportHandlerTest extends BeConfDependentTest { when( capabilityRequirementConverter .buildSubstitutedName(anyMap(), eq(toOriginComponent), anyList(), eq(capabilityName), eq( - capabilityPreviousName))) + capabilityPreviousName), any())) .thenReturn(Either.left(builtCapabilityName)); final String builtRequirementName = "builtRequirementName"; when( capabilityRequirementConverter .buildSubstitutedName(anyMap(), eq(fromOriginComponent), anyList(), eq(requirementName), eq( - requirementPreviousName))) + requirementPreviousName), any())) .thenReturn(Either.left(builtRequirementName)); final Map actualRequirementMap = @@ -1487,7 +1487,7 @@ public class ToscaExportHandlerTest extends BeConfDependentTest { when( capabilityRequirementConverter - .buildSubstitutedName(anyMap(), any(Component.class), anyList(), anyString(), anyString())) + .buildSubstitutedName(anyMap(), any(Component.class), anyList(), anyString(), anyString(), any())) .thenReturn(Either.right(false)); final String expectedErrorMsg = @@ -1520,12 +1520,12 @@ public class ToscaExportHandlerTest extends BeConfDependentTest { when( capabilityRequirementConverter - .buildSubstitutedName(anyMap(), eq(toOriginComponent), anyList(), eq("cap"), anyString())) + .buildSubstitutedName(anyMap(), eq(toOriginComponent), anyList(), eq("cap"), anyString(), any())) .thenReturn(Either.left("buildCapNameRes")); when( capabilityRequirementConverter - .buildSubstitutedName(anyMap(), eq(fromOriginComponent), anyList(), eq("req"), anyString())) + .buildSubstitutedName(anyMap(), eq(fromOriginComponent), anyList(), eq("req"), anyString(), any())) .thenReturn(Either.left("buildReqNameRes")); // default test @@ -1557,8 +1557,10 @@ public class ToscaExportHandlerTest extends BeConfDependentTest { relationship.setRequirement("req"); final String builtCapabilityOrRequirementName = "builtCapabilityOrRequirementName"; - when(capabilityRequirementConverter.buildSubstitutedName(any(), any(), any(), any(), any())) + when(capabilityRequirementConverter.buildSubstitutedName(anyMap(), eq(fromOriginComponent), anyList(), eq("cap"), any(), any())) .thenReturn(Either.left(builtCapabilityOrRequirementName)); + when(capabilityRequirementConverter.buildSubstitutedName(anyMap(), eq(toOriginComponent), anyList(), eq("req"), any(), any())) + .thenReturn(Either.left(builtCapabilityOrRequirementName)); final Map requirementMap = Deencapsulation .invoke(testSubject, "buildRequirement", fromOriginComponent, toOriginComponent, capability, requirement, -- cgit 1.2.3-korg