From: Sandeep J Date: Sun, 9 Sep 2018 20:58:11 +0000 (+0530) Subject: added test case to TestDGGeneralDBService X-Git-Tag: 1.4.0~28 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F11%2F65411%2F3;p=appc.git added test case to TestDGGeneralDBService to increase code coverage Issue-ID: APPC-1086 Change-Id: I034a158efa5d3d274b0ee92cc7d91ae918f7e744 Signed-off-by: Sandeep J --- 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");