diff options
author | Sandeep J <sandeejh@in.ibm.com> | 2019-03-28 15:29:15 +0530 |
---|---|---|
committer | Patrick Brady <patrick.brady@att.com> | 2019-03-28 17:47:52 +0000 |
commit | 0cc32eab8a84ab654c61b56d8afbffa117a073f1 (patch) | |
tree | 72f9a6e43ac7be581c000736440bae6faf034075 /appc-inbound/appc-artifact-handler/provider/src/test/java | |
parent | 5edb00ddfa691d32920e957bd37d0089805a83b6 (diff) |
added test case to DBServiceTest.java
to increase code coverage
Issue-ID: APPC-1086
Change-Id: I02b723e7f9aa83e2f7f51aa5a9c8883ac149299c
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-inbound/appc-artifact-handler/provider/src/test/java')
-rw-r--r-- | appc-inbound/appc-artifact-handler/provider/src/test/java/org/onap/appc/artifact/handler/dbservices/DBServiceTest.java | 16 |
1 files changed, 16 insertions, 0 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 dd62fca03..9d4740356 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 @@ -36,6 +36,7 @@ import org.onap.ccsdk.sli.core.sli.SvcLogicException; import org.onap.ccsdk.sli.core.sli.SvcLogicResource.QueryStatus; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; public class DBServiceTest { @@ -365,5 +366,20 @@ public class DBServiceTest { String expected = " AND ARTIFACT_NAME like '%_modelId.%'"; assertEquals(expected, queryPart); } + + @Test + public void testisProtocolReferenceUpdateRequired() throws SvcLogicException { + MockDBService dbService = MockDBService.initialise(); + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("test", "test"); + String vnfType = "testVnf"; + String protocol = "testProtocol"; + String action = "testAction"; + String actionLevel = "testActionLevel"; + String template = "testTemplateData"; + boolean result = dbService.isProtocolReferenceUpdateRequired(ctx, vnfType, protocol, action, actionLevel, template); + assertTrue(result); + } + } |