From: Alexey Sandler Date: Sat, 21 Dec 2019 18:22:08 +0000 (+0200) Subject: Add test to verify the count amount of networks during summarizing. X-Git-Tag: 6.0.1~47 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F74%2F99874%2F3;p=vid.git Add test to verify the count amount of networks during summarizing. Issue-ID: VID-724 Signed-off-by: Alexey Sandler Change-Id: Ic65c52deb66a8a1281a190443907b04b2385787a Signed-off-by: Alexey Sandler --- diff --git a/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBusinessLogicTest.java b/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBusinessLogicTest.java index 29d614cb2..b17b968ca 100644 --- a/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBusinessLogicTest.java +++ b/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBusinessLogicTest.java @@ -498,7 +498,8 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT Map childrenMap = asyncInstantiationBL.getSummarizedChildrenMap(serviceInstantiation); Map expectedMap = ImmutableMap.of( "vnf", 4L, - "vfModule", 6L + "vfModule", 6L, + "network", 2L ); assertEquals(childrenMap,expectedMap); diff --git a/vid-app-common/src/test/resources/payload_jsons/templateSummarize4vnfs6vfmodules.json b/vid-app-common/src/test/resources/payload_jsons/templateSummarize4vnfs6vfmodules.json index b00448296..89a120946 100644 --- a/vid-app-common/src/test/resources/payload_jsons/templateSummarize4vnfs6vfmodules.json +++ b/vid-app-common/src/test/resources/payload_jsons/templateSummarize4vnfs6vfmodules.json @@ -73,5 +73,21 @@ "modelType": "vnf" } } + }, + "networks": { + "Network-1": { + "instanceName": "myBestNetwork", + "instanceId": "884b373f-41c0-4a96-9785-7f075cb4ae9d", + "modelInfo": { + "modelType": "network" + } + }, + "Network-2": { + "instanceName": "myBestNetwork2", + "instanceId": "884b373f-41c0-4a96-9785-7f075cb4ae9d", + "modelInfo": { + "modelType": "network" + } + } } }