* 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
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;
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