summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/test/java
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2021-08-30 12:28:05 +0100
committerAndr� Schmid <andre.schmid@est.tech>2021-09-02 10:57:18 +0000
commita7b1f9beb7db0c03915b4a69f9a4ddff6dd7c414 (patch)
treefdf5ed22fc31f3a374f20d9d2b76f2744f53f840 /catalog-be/src/test/java
parent20d9463537de3840dcb47bc549168f77f64fbe36 (diff)
Fix mismatch in requirement name in sub mapping
Signed-off-by: MichaelMorris <michael.morris@est.tech> Issue-ID: SDC-3701 Change-Id: I0898d8b16c6e5cda035f33024f26644d7c6b1ef5
Diffstat (limited to 'catalog-be/src/test/java')
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaExportHandlerTest.java14
1 files changed, 8 insertions, 6 deletions
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<String, ToscaTemplateRequirement> 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<String, ToscaTemplateRequirement> requirementMap = Deencapsulation
.invoke(testSubject, "buildRequirement", fromOriginComponent, toOriginComponent, capability, requirement,