From ebffd13f0100839fecf5dbcd5c83856c193d8109 Mon Sep 17 00:00:00 2001 From: franciscovila Date: Tue, 26 Jul 2022 14:49:32 +0100 Subject: Service Import - Node Template Interface Definitions Add Node Template Interface Definitions when importing a service Issue-ID: SDC-4113 Signed-off-by: franciscovila Change-Id: I28bcb120ebd25b0baa4e62404d3fe38ce3a3706f --- .../csar/YamlTemplateParsingHandlerTest.java | 38 +++++++++++----------- .../impl/InterfaceDefinitionHandlerTest.java | 2 +- .../impl/ServiceImportBusinessLogicTest.java | 8 ++--- 3 files changed, 24 insertions(+), 24 deletions(-) (limited to 'catalog-be/src/test/java/org') diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/csar/YamlTemplateParsingHandlerTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/csar/YamlTemplateParsingHandlerTest.java index 967beb2235..df3dd1f0d6 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/csar/YamlTemplateParsingHandlerTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/csar/YamlTemplateParsingHandlerTest.java @@ -20,25 +20,6 @@ package org.openecomp.sdc.be.components.csar; -import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.when; -import static org.openecomp.sdc.be.utils.TypeUtils.ToscaTagNamesEnum.ARTIFACTS; - -import java.io.File; -import java.net.URISyntaxException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.stream.Collectors; import mockit.Deencapsulation; import org.apache.commons.collections.MapUtils; import org.apache.commons.lang3.StringUtils; @@ -75,6 +56,25 @@ import org.openecomp.sdc.common.zip.ZipUtils; import org.openecomp.sdc.common.zip.exception.ZipException; import org.springframework.test.util.ReflectionTestUtils; +import java.io.File; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.stream.Collectors; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.when; +import static org.openecomp.sdc.be.utils.TypeUtils.ToscaTagNamesEnum.ARTIFACTS; + @ExtendWith(MockitoExtension.class) public class YamlTemplateParsingHandlerTest { diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceDefinitionHandlerTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceDefinitionHandlerTest.java index 0ff1d698c0..bbbbcfc260 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceDefinitionHandlerTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceDefinitionHandlerTest.java @@ -108,7 +108,7 @@ class InterfaceDefinitionHandlerTest { @Test void testCreateWithOperationSuccess() throws FileNotFoundException { final Map load = loadYaml(Paths.get("interfaceDefinition-tosca1.3.yaml")); - final InterfaceDefinition actualInterfaceDefinition = interfaceDefinitionHandler.create(load, StringUtils.EMPTY); + final InterfaceDefinition actualInterfaceDefinition = interfaceDefinitionHandler.create( load, StringUtils.EMPTY); assertInterfaceDefinition(actualInterfaceDefinition); } diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogicTest.java index 3671ba7828..e5a4592b51 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogicTest.java @@ -878,7 +878,7 @@ class ServiceImportBusinessLogicTest extends ServiceImportBussinessLogicBaseTest Assertions.assertNotNull(yamlName); sIBL.processComponentInstance(yamlName, resource, componentInstancesList, allDataTypes.left().value(), instProperties, instCapabilties, instRequirements, instDeploymentArtifacts, instArtifacts, instAttributes, - originCompMap, instInputs, instNodeFilter, uploadComponentInstanceInfo); + originCompMap, instInputs, instNodeFilter, null, uploadComponentInstanceInfo); } @Test @@ -904,7 +904,7 @@ class ServiceImportBusinessLogicTest extends ServiceImportBussinessLogicBaseTest Assertions.assertThrows(ComponentException.class, () -> sIBL.processComponentInstance(yamlName, resource, componentInstancesList, null, instProperties, instCapabilties, instRequirements, instDeploymentArtifacts, instArtifacts, instAttributes, originCompMap, - instInputs, instNodeFilter, uploadComponentInstanceInfo)); + instInputs, instNodeFilter, null, uploadComponentInstanceInfo)); } @Test @@ -1209,7 +1209,7 @@ class ServiceImportBusinessLogicTest extends ServiceImportBussinessLogicBaseTest sIBL.processComponentInstance(yamlName, service, componentInstancesList, allDataTypes.left().value(), instProperties, instCapabilties, instRequirements, instDeploymentArtifacts, - instArtifacts, instAttributes, originCompMap, instInputs, instNodeFilter, + instArtifacts, instAttributes, originCompMap, instInputs, instNodeFilter, null, uploadComponentInstanceInfo); } @@ -1236,7 +1236,7 @@ class ServiceImportBusinessLogicTest extends ServiceImportBussinessLogicBaseTest Assertions.assertThrows(ComponentException.class, () -> sIBL.processComponentInstance(yamlName, service, componentInstancesList, null, instProperties, instCapabilties, instRequirements, instDeploymentArtifacts, instArtifacts, instAttributes, originCompMap, - instInputs, instNodeFilter, uploadComponentInstanceInfo)); + instInputs, instNodeFilter, null, uploadComponentInstanceInfo)); } @Test -- cgit 1.2.3-korg