From 2225b30cd1f3f41348712278510ec6c0f2adb638 Mon Sep 17 00:00:00 2001 From: Pavel Aharoni Date: Tue, 5 Sep 2017 18:57:07 +0300 Subject: [SDC-243] adding value to SdcTypes Change-Id: I7e1236d9cecbf2d44744766eb7f27d7145d5a537 Signed-off-by: Pavel Aharoni --- .../org/openecomp/sdc/impl/SdcToscaParserBasicTest.java | 5 ++++- .../openecomp/sdc/impl/ToscaParserNodeTemplateTest.java | 9 ++++++++- src/test/resources/csars/service-PortMirroring.csar | Bin 0 -> 56821 bytes 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 src/test/resources/csars/service-PortMirroring.csar (limited to 'src/test') diff --git a/src/test/java/org/openecomp/sdc/impl/SdcToscaParserBasicTest.java b/src/test/java/org/openecomp/sdc/impl/SdcToscaParserBasicTest.java index a73f121..90124c5 100644 --- a/src/test/java/org/openecomp/sdc/impl/SdcToscaParserBasicTest.java +++ b/src/test/java/org/openecomp/sdc/impl/SdcToscaParserBasicTest.java @@ -33,8 +33,10 @@ public abstract class SdcToscaParserBasicTest { static ISdcCsarHelper resolveGetInputCsarFalse; static ISdcCsarHelper resolveGetInputCsarQA; static ISdcCsarHelper resolveReqsCapsCsarQA; + static ISdcCsarHelper portMirroring; - static Map>> fdntCsarHelper_Data; + + static Map>> fdntCsarHelper_Data; @BeforeClass public static void init() throws SdcToscaParserException, JToscaException, IOException { @@ -53,6 +55,7 @@ public abstract class SdcToscaParserBasicTest { resolveGetInputCsarQA = getCsarHelper("csars/service-resolve-get-input-csar_QA.csar"); QAServiceForToscaParserTests = getCsarHelper("csars/service-ServiceForToscaParserTests-csar.csar"); resolveReqsCapsCsarQA = getCsarHelper("csars/service-sunny-flow2.csar"); + portMirroring = getCsarHelper("csars/service-PortMirroring.csar"); fdntCsarHelper_Data = new HashMap>>(){ { diff --git a/src/test/java/org/openecomp/sdc/impl/ToscaParserNodeTemplateTest.java b/src/test/java/org/openecomp/sdc/impl/ToscaParserNodeTemplateTest.java index 2c62ca2..ad240b1 100644 --- a/src/test/java/org/openecomp/sdc/impl/ToscaParserNodeTemplateTest.java +++ b/src/test/java/org/openecomp/sdc/impl/ToscaParserNodeTemplateTest.java @@ -483,10 +483,17 @@ public class ToscaParserNodeTemplateTest extends SdcToscaParserBasicTest { public void testServiceNodeTemplateBySdcType() { List serviceVfList = fdntCsarHelper.getServiceNodeTemplateBySdcType(SdcTypes.VF); assertNotNull(serviceVfList); - assertEquals(2, serviceVfList.size()); + assertEquals(serviceVfList.size(), 2); assertEquals(serviceVfList.get(0).getName(), "FDNT 1"); } + @Test + public void testServiceNodeTemplateBySdcTypeServiceProxy() { + List serviceProxies = portMirroring.getServiceNodeTemplateBySdcType(SdcTypes.SERVICE_PROXY); + assertNotNull(serviceProxies); + assertEquals(serviceProxies.size(), 2); + } + @Test public void testServiceNodeTemplateByNullSdcType() { List serviceVfList = fdntCsarHelper.getServiceNodeTemplateBySdcType(null); diff --git a/src/test/resources/csars/service-PortMirroring.csar b/src/test/resources/csars/service-PortMirroring.csar new file mode 100644 index 0000000..6186291 Binary files /dev/null and b/src/test/resources/csars/service-PortMirroring.csar differ -- cgit 1.2.3-korg