From 54af5cdca044c7b486f02f4163d16c39e990f701 Mon Sep 17 00:00:00 2001 From: Alexey Sandler Date: Sat, 21 Dec 2019 20:22:08 +0200 Subject: 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 --- .../services/AsyncInstantiationBusinessLogicTest.java | 3 ++- .../payload_jsons/templateSummarize4vnfs6vfmodules.json | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) 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" + } + } } } -- cgit 1.2.3-korg