added test case to TestDGGeneralDBService 11/65411/3
authorSandeep J <sandeejh@in.ibm.com>
Sun, 9 Sep 2018 20:58:11 +0000 (02:28 +0530)
committerTakamune Cho <tc012c@att.com>
Tue, 11 Sep 2018 14:24:47 +0000 (14:24 +0000)
to increase code coverage

Issue-ID: APPC-1086
Change-Id: I034a158efa5d3d274b0ee92cc7d91ae918f7e744
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestDGGeneralDBService.java

index d1c7fdb..bcf6493 100644 (file)
@@ -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");