summaryrefslogtreecommitdiffstats
path: root/appc-inbound/appc-artifact-handler/provider
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2019-03-26 13:48:52 +0530
committerPatrick Brady <patrick.brady@att.com>2019-03-26 20:04:32 +0000
commita016bd294a49ef80d747601935f7071aae88e9ab (patch)
tree03826fe23ded75c548014648b221029869f19f36 /appc-inbound/appc-artifact-handler/provider
parentec4cbd6ece11a0c5eadafc7f4048c3e41e504194 (diff)
added test case to DBServiceTest.java
to increase code coverage Issue-ID: APPC-1086 Change-Id: I202822e53c2086b5db41a8028410c07c46821d1d Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-inbound/appc-artifact-handler/provider')
-rw-r--r--appc-inbound/appc-artifact-handler/provider/src/test/java/org/onap/appc/artifact/handler/dbservices/DBServiceTest.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/appc-inbound/appc-artifact-handler/provider/src/test/java/org/onap/appc/artifact/handler/dbservices/DBServiceTest.java b/appc-inbound/appc-artifact-handler/provider/src/test/java/org/onap/appc/artifact/handler/dbservices/DBServiceTest.java
index 0676d59fd..dd62fca03 100644
--- a/appc-inbound/appc-artifact-handler/provider/src/test/java/org/onap/appc/artifact/handler/dbservices/DBServiceTest.java
+++ b/appc-inbound/appc-artifact-handler/provider/src/test/java/org/onap/appc/artifact/handler/dbservices/DBServiceTest.java
@@ -6,7 +6,7 @@
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
- * Modifications Copyright (C) 2018 IBM
+ * Modifications Copyright (C) 2018-2019 IBM
* ================================================================================
* Modifications Copyright (C) 2019 Ericsson
* ================================================================================
@@ -357,5 +357,13 @@ public class DBServiceTest {
expectedEx.expectMessage("An error occurred when getting DG reference");
assertEquals("TestDG", dbService.getDownLoadDGReference(ctx));
}
+
+ @Test
+ public void testcreateQueryListForTemplateIds() {
+ MockDBService dbService = MockDBService.initialise(true);
+ String queryPart = dbService.createQueryListForTemplateIds("modelId");
+ String expected = " AND ARTIFACT_NAME like '%_modelId.%'";
+ assertEquals(expected, queryPart);
+ }
}