From 9370a639b9e692621c59ff3a15590b9354e9d178 Mon Sep 17 00:00:00 2001 From: shalomb Date: Wed, 3 Jan 2018 14:22:33 +0200 Subject: Add contributors for items vi zusammen tool Add contributors for items vi zusammen tool new command fix sonar issues Change-Id: I890480cd410a8ab73156bab7ef80846f7e50dd9c Issue-ID: SDC-871 Signed-off-by: shalomb --- .../exportinfo/serialize/VLMExtractTest.java | 47 ---------------------- .../exportinfo/serialize/VLMExtractTest.java | 47 ++++++++++++++++++++++ 2 files changed, 47 insertions(+), 47 deletions(-) delete mode 100644 openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/Commands/exportinfo/serialize/VLMExtractTest.java create mode 100644 openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/commands/exportinfo/serialize/VLMExtractTest.java (limited to 'openecomp-be/tools/zusammen-tools/src/test/java') diff --git a/openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/Commands/exportinfo/serialize/VLMExtractTest.java b/openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/Commands/exportinfo/serialize/VLMExtractTest.java deleted file mode 100644 index ed1ad2b2f4..0000000000 --- a/openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/Commands/exportinfo/serialize/VLMExtractTest.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.openecomp.core.tools.Commands.exportinfo.serialize; - -import org.openecomp.core.tools.exportinfo.ExportSerializer; -import org.testng.annotations.Test; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertNull; -public class VLMExtractTest { - - - - @Test - public void extractVLM(){ - String vlmId = "979a56c7b2fa41e6a5742137f53a5c1b"; - String elemenet_info_string = "{\n" + - " \"name\": \"VendorSoftwareProduct\",\n" + - " \"properties\": {\n" + - " \"subCategory\": \"resourceNewCategory.dcae component.collector\",\n" + - " \"name\": \"vsp1\",\n" + - " \"icon\": \"icon\",\n" + - " \"onboardingMethod\": \"NetworkPackage\",\n" + - " \"description\": \"d\",\n" + - " \"vendorId\": \""+vlmId+"\",\n" + - " \"category\": \"resourceNewCategory.dcae component\",\n" + - " \"vendorName\": \"vlm1\",\n" + - " \"elementType\": \"VendorSoftwareProduct\"\n" + - " }\n" + - "}\n" ; - String extractedVlmId = new CustomExportSerializer().extractVlm(elemenet_info_string); - assertNotNull(extractedVlmId); - assertEquals(extractedVlmId,vlmId); - - } - - @Test(expectedExceptions = IllegalStateException.class) - public void failToExtractVLMBecauseJsonIsCorrupted(){ - String elemenet_info_string = "gfhhhghgh"; - assertNull(new CustomExportSerializer().extractVlm(elemenet_info_string)); - } - - private static final class CustomExportSerializer extends ExportSerializer{ - public String extractVlm(String inJson) { - return super.extractVlm(inJson); - } - } -} diff --git a/openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/commands/exportinfo/serialize/VLMExtractTest.java b/openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/commands/exportinfo/serialize/VLMExtractTest.java new file mode 100644 index 0000000000..7b86903308 --- /dev/null +++ b/openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/commands/exportinfo/serialize/VLMExtractTest.java @@ -0,0 +1,47 @@ +package org.openecomp.core.tools.commands.exportinfo.serialize; + +import org.openecomp.core.tools.exportinfo.ExportSerializer; +import org.testng.annotations.Test; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.assertNull; +public class VLMExtractTest { + + + + @Test + public void extractVLM(){ + String vlmId = "979a56c7b2fa41e6a5742137f53a5c1b"; + String elemenet_info_string = "{\n" + + " \"name\": \"VendorSoftwareProduct\",\n" + + " \"properties\": {\n" + + " \"subCategory\": \"resourceNewCategory.dcae component.collector\",\n" + + " \"name\": \"vsp1\",\n" + + " \"icon\": \"icon\",\n" + + " \"onboardingMethod\": \"NetworkPackage\",\n" + + " \"description\": \"d\",\n" + + " \"vendorId\": \""+vlmId+"\",\n" + + " \"category\": \"resourceNewCategory.dcae component\",\n" + + " \"vendorName\": \"vlm1\",\n" + + " \"elementType\": \"VendorSoftwareProduct\"\n" + + " }\n" + + "}\n" ; + String extractedVlmId = new CustomExportSerializer().extractVlm(elemenet_info_string); + assertNotNull(extractedVlmId); + assertEquals(extractedVlmId,vlmId); + + } + + @Test(expectedExceptions = IllegalStateException.class) + public void failToExtractVLMBecauseJsonIsCorrupted(){ + String elemenet_info_string = "gfhhhghgh"; + assertNull(new CustomExportSerializer().extractVlm(elemenet_info_string)); + } + + private static final class CustomExportSerializer extends ExportSerializer{ + public String extractVlm(String inJson) { + return super.extractVlm(inJson); + } + } +} -- cgit