summaryrefslogtreecommitdiffstats
path: root/appc-config/appc-flow-controller
diff options
context:
space:
mode:
Diffstat (limited to 'appc-config/appc-flow-controller')
-rw-r--r--appc-config/appc-flow-controller/provider/src/test/java/org/onap/appc/flow/controller/data/TransactionTest.java26
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