From 42b0c6f15278f1d92a7a07db1b253ff50374ee4f Mon Sep 17 00:00:00 2001 From: Sandeep J Date: Tue, 7 Aug 2018 17:21:05 +0530 Subject: updated existing test in TransactionTest.java to increase code coverage Issue-ID: APPC-1086 Change-Id: I2a16e144489647a011735bad462665690eeba368 Signed-off-by: Sandeep J --- .../appc/flow/controller/data/TransactionTest.java | 41 ++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) (limited to 'appc-config/appc-flow-controller') diff --git a/appc-config/appc-flow-controller/provider/src/test/java/org/onap/appc/flow/controller/data/TransactionTest.java b/appc-config/appc-flow-controller/provider/src/test/java/org/onap/appc/flow/controller/data/TransactionTest.java index ab8cecd1b..653c0fc25 100644 --- a/appc-config/appc-flow-controller/provider/src/test/java/org/onap/appc/flow/controller/data/TransactionTest.java +++ b/appc-config/appc-flow-controller/provider/src/test/java/org/onap/appc/flow/controller/data/TransactionTest.java @@ -204,11 +204,48 @@ public class TransactionTest { @Test public void equals() { + ActionIdentifier actionIdentifier = mock(ActionIdentifier.class); + PreCheck precheck = mock(PreCheck.class); + ArrayList responses = new ArrayList<>(); + Parameters parameters = mock(Parameters.class); + ArrayList parametersList = new ArrayList<>(); + parametersList.add(parameters); transaction.setAction("action"); - + transaction.setActionIdentifier(actionIdentifier); + transaction.setActionLevel("some_action_level"); + transaction.setExecutionRPC("some_execution_rpc"); + transaction.setExecutionType("some_execution_type"); + transaction.setExecutionModule("some_execution_module"); + transaction.setExecutionEndPoint("some_execution_endpoint"); + transaction.setState("some_state"); + transaction.setStatus("some_status"); + transaction.setStatusCode("some_status_code"); + transaction.setPswd("some_pass"); + transaction.setPayload("some_payload"); + transaction.setPrecheck(precheck); + transaction.setParameters(parametersList); + transaction.setResponses(responses); + transaction.setTransactionId(133); + transaction.setuId("some_uid"); Transaction other = new Transaction(); other.setAction("action"); - + other.setAction("action"); + other.setActionIdentifier(actionIdentifier); + other.setActionLevel("some_action_level"); + other.setExecutionRPC("some_execution_rpc"); + other.setExecutionType("some_execution_type"); + other.setExecutionModule("some_execution_module"); + other.setExecutionEndPoint("some_execution_endpoint"); + other.setState("some_state"); + other.setStatus("some_status"); + other.setStatusCode("some_status_code"); + other.setPswd("some_pass"); + other.setPayload("some_payload"); + other.setPrecheck(precheck); + other.setParameters(parametersList); + other.setResponses(responses); + other.setTransactionId(133); + other.setuId("some_uid"); Assert.assertTrue(transaction.equals(other)); } -- cgit 1.2.3-korg