Junit for appc-config/Data-services 71/56471/3
authorDilip kumar Pampana <dilip.kumar.pampana@ibm.com>
Mon, 16 Jul 2018 02:05:28 +0000 (22:05 -0400)
committerDilip kumar Pampana <dilip.kumar.pampana@ibm.com>
Mon, 16 Jul 2018 17:17:48 +0000 (17:17 +0000)
Junit Test to GetConfigFileReferenceByVnfType in appc-config/Data-services

Issue-ID: APPC-1080
Change-Id: I351cd7acc1ef6310d230d22bd7a0035d35722290
Signed-off-by: Dilip kumar Pampana <dilip.kumar.pampana@ibm.com>
appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestDGGeneralDBService.java

index ba8b8ae..875c68b 100644 (file)
@@ -5,6 +5,8 @@
  * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Copyright (C) 2017 Amdocs
+ * ================================================================================
+ * 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.
@@ -222,4 +224,15 @@ public class TestDGGeneralDBService {
         String fileCategory="testCategory";
         dbService.getTemplateByVnfTypeNActionWithTemplateModelId(ctx, prefix, fileCategory, templateModelId);
     }
+
+    @Test
+    public void testGetConfigFileReferenceByVnfType() throws Exception {
+        SvcLogicContext ctx = new SvcLogicContext();
+        ctx.setAttribute("vnf-type", "test");
+        ctx.setAttribute("request-action", "Configure");
+        MockDGGeneralDBService dbService =     MockDGGeneralDBService.initialise();
+        QueryStatus status = dbService.getConfigFileReferenceByVnfType(ctx, "test");
+        assertEquals(status, QueryStatus.SUCCESS);
+
+    }
 }