summaryrefslogtreecommitdiffstats
path: root/appc-config
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2018-09-10 02:28:11 +0530
committerTakamune Cho <tc012c@att.com>2018-09-11 14:24:47 +0000
commiteb3caaa3717bff67a566585dd0b1bd34b2dc3b04 (patch)
tree78bbbec20e2e8992f7cf1ced684ee9e81c09c07a /appc-config
parent6803143f3ab9b24b212de4cacf16bb739450f1b6 (diff)
added test case to TestDGGeneralDBService
to increase code coverage Issue-ID: APPC-1086 Change-Id: I034a158efa5d3d274b0ee92cc7d91ae918f7e744 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-config')
-rw-r--r--appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestDGGeneralDBService.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestDGGeneralDBService.java b/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestDGGeneralDBService.java
index d1c7fdb7b..bcf649339 100644
--- a/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestDGGeneralDBService.java
+++ b/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestDGGeneralDBService.java
@@ -6,7 +6,7 @@
* ================================================================================
* Copyright (C) 2017 Amdocs
* ================================================================================
- * Modification Copyright (C) 2018 IBM
+ * Modifications Copyright (C) 2018 IBM
* =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -172,6 +172,18 @@ public class TestDGGeneralDBService {
}
@Test
+ public void getVnfcReferenceByVnfcTypeNAction() throws SvcLogicException {
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("vnf-type", "testVnf");
+ ctx.setAttribute("vnfc-type", "testVnfc");
+ ctx.setAttribute("request-action", "Configure");
+ MockDGGeneralDBService dbService = MockDGGeneralDBService.initialise();
+ QueryStatus status = dbService.getVnfcReferenceByVnfcTypeNAction(ctx, "test");
+ assertEquals(QueryStatus.SUCCESS, status);
+ }
+
+ @Test
public void testGetDownloadConfigTemplateByVnf() throws SvcLogicException {
SvcLogicContext ctx = new SvcLogicContext();
@@ -251,7 +263,7 @@ public class TestDGGeneralDBService {
@Test
public void testCleanContextPropertyByPrefix()
{
- SvcLogicContext ctx = new SvcLogicContext();
+ SvcLogicContext ctx = new SvcLogicContext();
ctx.setAttribute("vnf-type", "test");
ctx.setAttribute("request-action", "Configure");
ctx.setAttribute(".vnfc-type", "Configure");