aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/test/java
diff options
context:
space:
mode:
authorAlexey Sandler <alexey.sandler@intl.att.com>2019-12-19 11:05:40 +0200
committerAlexey Sandler <alexey.sandler@intl.att.com>2019-12-19 12:48:07 +0200
commit2eff2870374b37be96b29e5a3d8f9c021f038a10 (patch)
tree1dad005fc8782795424177e29afbd4be833f6c42 /vid-app-common/src/test/java
parent5f8ce4adff724009dad903887cd320a0095c1437 (diff)
Add resources summarizing function in service instance.
Issue-ID: VID-724 Signed-off-by: Alexey Sandler <alexey.sandler@intl.att.com> Change-Id: I9f4d6201cadd31e84ef90f25a619d95bf74eb9ae Signed-off-by: Alexey Sandler <alexey.sandler@intl.att.com>
Diffstat (limited to 'vid-app-common/src/test/java')
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBusinessLogicTest.java11
1 files changed, 11 insertions, 0 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 d1124f3a8..4b4aa4deb 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
@@ -491,6 +491,17 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT
return prepareServiceInstantiation(PROJECT_NAME, isUserProvidedNaming, bulkSize);
}
+ @Test
+ public void getSummarizedMap(){
+ ServiceInstantiation serviceInstantiation = TestUtils.readJsonResourceFileAsObject(
+ "/payload_jsons/templateSummarize4vnfs6vfmodules.json", ServiceInstantiation.class);
+ Map<String, Long> childrenMap = asyncInstantiationBL.getSummarizedChildrenMap(serviceInstantiation);
+ HashMap<String, Long> expectedMap = new HashMap<>();
+ expectedMap.put("vnf", Long.valueOf(4));
+ expectedMap.put("vfModule", Long.valueOf(6));
+ assertEquals(childrenMap,expectedMap);
+
+ }
@Test