aboutsummaryrefslogtreecommitdiffstats
path: root/appc-config/appc-data-services
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2019-02-06 15:20:00 +0530
committerTakamune Cho <takamune.cho@att.com>2019-02-06 13:03:37 +0000
commite38c122ec2c57e63d0788148841fbe6231957482 (patch)
tree31a38da272b2484137ae3696fe46bdb703cab412 /appc-config/appc-data-services
parente037dcd6ad404acb2df5da6f5b20f8f81f8e5c13 (diff)
added test case to ConfigResourceNodeTest
to increase code coverage Issue-ID: APPC-1086 Change-Id: I69a92c10c3c2543a45ebf333e708286ffb6ac454 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-config/appc-data-services')
-rw-r--r--appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/node/ConfigResourceNodeTest.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/node/ConfigResourceNodeTest.java b/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/node/ConfigResourceNodeTest.java
index fd3448ed5..5ecdbc49c 100644
--- a/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/node/ConfigResourceNodeTest.java
+++ b/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/node/ConfigResourceNodeTest.java
@@ -25,6 +25,7 @@ package org.onap.appc.data.services.node;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.atLeastOnce;
@@ -734,4 +735,24 @@ public class ConfigResourceNodeTest {
verify(contextMock, atLeastOnce()).setAttribute(anyString(), eq(AppcDataServiceConstant.OUTPUT_STATUS_SUCCESS));
}
+
+ @Test
+ public void testSaveConfigTransactionLog() throws SvcLogicException
+ {
+ SvcLogicContext context = new SvcLogicContext();
+ inParams.put(AppcDataServiceConstant.INPUT_PARAM_RESPONSE_PREFIX, "test");
+ inParams.put(AppcDataServiceConstant.INPUT_PARAM_MESSAGE_TYPE, "test");
+ inParams.put(AppcDataServiceConstant.INPUT_PARAM_MESSAGE, "test");
+
+ context.setAttribute("request-id", "test");
+ DGGeneralDBService dbServiceMock =
+ new MockDbServiceBuilder().savePrepareRelationship(PREPARE_RELATIONSHIP_PARAM, "some file id", SDC_IND,
+ SvcLogicResource.QueryStatus.FAILURE).build();
+
+ ConfigResourceNode configResourceNode = new ConfigResourceNode(dbServiceMock);
+ configResourceNode.saveConfigTransactionLog(inParams, contextMock);
+ assertEquals(null,contextMock.getAttribute("log-message"));
+ }
+
+
}