added test case to DBServiceTest.java
[appc.git] / appc-inbound / appc-artifact-handler / provider / src / test / java / org / onap / appc / artifact / handler / dbservices / DBServiceTest.java
index 0676d59..dd62fca 100644 (file)
@@ -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);
+    }
 }