diff options
author | Sandeep J <sandeejh@in.ibm.com> | 2018-07-25 15:34:25 +0530 |
---|---|---|
committer | Takamune Cho <tc012c@att.com> | 2018-07-26 13:18:36 +0000 |
commit | 24742d99d24d1cfce0a4fc84658e38d2444ed04c (patch) | |
tree | 9df1c7ca87949fe5d77ed3f5f98e61b87eec970d /appc-config | |
parent | 4ff6f2a5d19852018c718ea431baf6d1dedda051 (diff) |
added test case to TransactionTest.java
added test case to increase code coverage
Issue-ID: APPC-1086
Change-Id: Ib02211122e9d662387858c70876f3784e65ec0ce
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-config')
-rw-r--r-- | appc-config/appc-flow-controller/provider/src/test/java/org/onap/appc/flow/controller/data/TransactionTest.java | 26 |
1 files changed, 24 insertions, 2 deletions
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 cb8f088d8..ab8cecd1b 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 @@ -3,7 +3,9 @@ * ONAP : APPC * ================================================================================ * Copyright (C) 2018 Nokia Intellectual Property. All rights reserved. - * ============================================================================= + * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -22,7 +24,7 @@ package org.onap.appc.flow.controller.data; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; - +import static org.junit.Assert.assertEquals; import java.util.ArrayList; import org.junit.Assert; import org.junit.Before; @@ -209,5 +211,25 @@ public class TransactionTest { Assert.assertTrue(transaction.equals(other)); } + + @Test + public void testHashCode() + { + transaction.setAction("some_action"); + 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.setTransactionId(133); + transaction.setuId("some_uid"); + int hashcode= transaction.hashCode(); + assertEquals(-955260883,hashcode); + } }
\ No newline at end of file |