aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Sandler <alexey.sandler@intl.att.com>2019-12-21 20:22:08 +0200
committerAlexey Sandler <alexey.sandler@intl.att.com>2019-12-21 20:28:08 +0200
commit54af5cdca044c7b486f02f4163d16c39e990f701 (patch)
treee98362f08c3f7d2db9412ef0ce83b137ef79a2e3
parent0f5a95ab335b475d626eddda040ad3ac3105f24e (diff)
Add test to verify the count amount of networks during summarizing.
Issue-ID: VID-724 Signed-off-by: Alexey Sandler <alexey.sandler@intl.att.com> Change-Id: Ic65c52deb66a8a1281a190443907b04b2385787a Signed-off-by: Alexey Sandler <alexey.sandler@intl.att.com>
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBusinessLogicTest.java3
-rw-r--r--vid-app-common/src/test/resources/payload_jsons/templateSummarize4vnfs6vfmodules.json16
2 files changed, 18 insertions, 1 deletions
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<String, Long> childrenMap = asyncInstantiationBL.getSummarizedChildrenMap(serviceInstantiation);
Map<String, Long> 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"
+ }
+ }
}
}