summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestDGGeneralDBService.java39
1 files changed, 37 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 bcf649339..234b3fab5 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
* ================================================================================
- * Modifications Copyright (C) 2018 IBM
+ * Modifications Copyright (C) 2018-2019 IBM
* =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -184,13 +184,48 @@ public class TestDGGeneralDBService {
}
@Test
+ public void testSaveConfigFiles() throws SvcLogicException {
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("data-source", "test");
+ ctx.setAttribute("service-instance-id", "test");
+ ctx.setAttribute("request-action", "test");
+ ctx.setAttribute("vnf-type", "test");
+ ctx.setAttribute("vnfc-type", "test");
+ ctx.setAttribute("vnf-id", "test");
+ ctx.setAttribute("vnf-name", "test");
+ ctx.setAttribute("vm-name", "test");
+ ctx.setAttribute("file-category", "test");
+ ctx.setAttribute("file-content", "test");
+
+ MockDGGeneralDBService dbService = MockDGGeneralDBService.initialise();
+ QueryStatus status = dbService.saveConfigFiles(ctx, "test");
+ assertEquals(QueryStatus.SUCCESS, status);
+
+ }
+
+ @Test
+ public void testSavePrepareRelationship() throws SvcLogicException {
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("service-instance-id", "test");
+ ctx.setAttribute("request-id", "test");
+
+
+ MockDGGeneralDBService dbService = MockDGGeneralDBService.initialise();
+ QueryStatus status = dbService.savePrepareRelationship(ctx, "test","test", "test");
+ assertEquals(QueryStatus.SUCCESS,status);
+
+ }
+
+ @Test
public void testGetDownloadConfigTemplateByVnf() throws SvcLogicException {
SvcLogicContext ctx = new SvcLogicContext();
ctx.setAttribute("vnf-type", "test");
MockDGGeneralDBService dbService = MockDGGeneralDBService.initialise();
QueryStatus status = dbService.getDownloadConfigTemplateByVnf(ctx, "test");
- assertEquals(status, QueryStatus.SUCCESS);
+ assertEquals(QueryStatus.SUCCESS,status);
}
@Test