From eb3caaa3717bff67a566585dd0b1bd34b2dc3b04 Mon Sep 17 00:00:00 2001 From: Sandeep J Date: Mon, 10 Sep 2018 02:28:11 +0530 Subject: added test case to TestDGGeneralDBService to increase code coverage Issue-ID: APPC-1086 Change-Id: I034a158efa5d3d274b0ee92cc7d91ae918f7e744 Signed-off-by: Sandeep J --- .../appc/data/services/db/TestDGGeneralDBService.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'appc-config/appc-data-services') 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. @@ -171,6 +171,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 { @@ -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"); -- cgit 1.2.3-korg