From 18ae7612481c386db22fe983dedf331a29141444 Mon Sep 17 00:00:00 2001 From: Francis Toth Date: Sat, 2 May 2020 10:16:17 -0400 Subject: Refactor CsarUtils::WriteArtifactDefinition Signed-off-by: Francis Toth Change-Id: I167a05d8fbc2085a3e25eeb5bfd6b30f0e80462e Issue-ID: SDC-2812 --- .../org/openecomp/sdc/be/tosca/CsarUtilsTest.java | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'catalog-be/src/test') diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/CsarUtilsTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/CsarUtilsTest.java index 3ee2b89047..4fd8a70229 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/CsarUtilsTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/CsarUtilsTest.java @@ -43,6 +43,8 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Optional; import java.util.Set; +import java.util.stream.Collectors; +import java.util.stream.Stream; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; import mockit.Deencapsulation; @@ -780,24 +782,6 @@ public class CsarUtilsTest extends BeConfDependentTest { CsarUtils.validateNonMetaArtifact("", new byte[0], new HashMap<>()); } - @Test - public void testWriteArtifactDefinition() throws IOException { - Component component = new Service(); - List artifactDefinitionList = new ArrayList<>(); - String artifactPathAndFolder = ""; - - ArtifactDefinition artifact = new ArtifactDefinition(); - artifact.setArtifactType(ArtifactTypeEnum.HEAT_ENV.getType()); - artifactDefinitionList.add(artifact); - - try (ByteArrayOutputStream out = new ByteArrayOutputStream(); ZipOutputStream zip = new ZipOutputStream(out);) { - Either output = Deencapsulation.invoke(testSubject, "writeArtifactDefinition", component, zip, artifactDefinitionList, artifactPathAndFolder, false); - - assertNotNull(output); - assertTrue(output.isLeft()); - } - } - @Test public void testCollectComponentCsarDefinitionWhenComponentIsServiceAndGetToscaElementIsLeft() { Component component = new Service(); -- cgit 1.2.3-korg