From a016bd294a49ef80d747601935f7071aae88e9ab Mon Sep 17 00:00:00 2001 From: Sandeep J Date: Tue, 26 Mar 2019 13:48:52 +0530 Subject: added test case to DBServiceTest.java to increase code coverage Issue-ID: APPC-1086 Change-Id: I202822e53c2086b5db41a8028410c07c46821d1d Signed-off-by: Sandeep J --- .../onap/appc/artifact/handler/dbservices/DBServiceTest.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'appc-inbound/appc-artifact-handler/provider/src') 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); + } } -- cgit 1.2.3-korg