From 385a51ea728c998d6f7867caf3989fa751de9087 Mon Sep 17 00:00:00 2001 From: Sara Weiss Date: Tue, 3 Sep 2019 10:59:46 +0300 Subject: Add UT to ToscaParserImpl Issue-ID: VID-378 Signed-off-by: Sara Weiss Change-Id: If2cf3bd2171b7935702008f7a16fbea1b8523a35 --- .../java/org/onap/vid/asdc/parser/ToscaParserImpl2Test.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'vid-app-common/src/test/java') diff --git a/vid-app-common/src/test/java/org/onap/vid/asdc/parser/ToscaParserImpl2Test.java b/vid-app-common/src/test/java/org/onap/vid/asdc/parser/ToscaParserImpl2Test.java index aeb010071..10f272a36 100644 --- a/vid-app-common/src/test/java/org/onap/vid/asdc/parser/ToscaParserImpl2Test.java +++ b/vid-app-common/src/test/java/org/onap/vid/asdc/parser/ToscaParserImpl2Test.java @@ -127,6 +127,19 @@ public class ToscaParserImpl2Test { assertJsonStringEqualsIgnoreNulls(om.writeValueAsString(expectedService), om.writeValueAsString(actualService)); } + + @Test + public void testScalingPolicyOfGroup() throws AsdcCatalogException, SdcToscaParserException { + String vnfGroupingUuid = "4117a0b6-e234-467d-b5b9-fe2f68c8b0fc"; + ISdcCsarHelper sdcCsarHelper = toscaParserImpl2.getSdcCsarHelper(getCsarPath(vnfGroupingUuid)); + Map policiesTargets = toscaParserImpl2.extractScalingPolicyOfGroup(sdcCsarHelper); + + assertThat(policiesTargets, is(ImmutableMap.of( + "vdorothea_svc_vprs_proxy 0", 2, + "groupingservicefortest..ResourceInstanceGroup..1", 3 + ))); + } + @Test(dataProvider = "expectedServiceModel") public void assertEqualBetweenObjects(String uuid, ToscaParserMockHelper mockHelper) throws Exception { final Path csarPath = getCsarPath(mockHelper.getUuid()); -- cgit 1.2.3-korg