summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoss Armstrong <joss.armstrong@ericsson.com>2019-02-26 11:40:14 +0000
committerTakamune Cho <takamune.cho@att.com>2019-02-26 15:18:39 +0000
commitc937e33451a3e609a838d0f0283fb1f925f9b83d (patch)
tree9561f344744d06ff14eeb0b950bd2c0dee046ec0
parent827f080adcd48b95569ae0ee2e54b3573320e976 (diff)
Test coverage for ActionIdentifier
Increased test coverage to 100% Issue-ID: APPC-1499 Change-Id: I78eee1fdc64840898e1b76984855a43828ee93b4 Signed-off-by: Joss Armstrong <joss.armstrong@ericsson.com>
-rw-r--r--appc-config/appc-flow-controller/provider/src/test/java/org/onap/appc/flow/controller/data/ActionIdentifierTest.java23
1 files changed, 17 insertions, 6 deletions
diff --git a/appc-config/appc-flow-controller/provider/src/test/java/org/onap/appc/flow/controller/data/ActionIdentifierTest.java b/appc-config/appc-flow-controller/provider/src/test/java/org/onap/appc/flow/controller/data/ActionIdentifierTest.java
index cc0ed3dd4..83a215779 100644
--- a/appc-config/appc-flow-controller/provider/src/test/java/org/onap/appc/flow/controller/data/ActionIdentifierTest.java
+++ b/appc-config/appc-flow-controller/provider/src/test/java/org/onap/appc/flow/controller/data/ActionIdentifierTest.java
@@ -62,16 +62,27 @@ public class ActionIdentifierTest {
@Test
public void testEquals() {
ActionIdentifier actionId1 = new ActionIdentifier();
+ assertTrue(actionId1.equals(actionId1));
+ assertFalse(actionId1.equals(null));
+ assertFalse(actionId1.equals(""));
ActionIdentifier actionId2 = new ActionIdentifier();
-
- actionId1.setVnfcName("vnfcName");
+ actionId2.setVnfId("other_vnfId");
+ assertFalse(actionId1.equals(actionId2));
actionId1.setVnfId("vnfId");
- actionId1.setVserverId("vserverId");
- actionId2.setVnfcName("vnfcName");
+ assertFalse(actionId1.equals(actionId2));
actionId2.setVnfId("vnfId");
+
+ actionId2.setVnfcName("other_vnfcName");
+ assertFalse(actionId1.equals(actionId2));
+ actionId1.setVnfcName("vnfc_name");
+ assertFalse(actionId1.equals(actionId2));
+ actionId2.setVnfcName("vnfc_name");
+ actionId2.setVserverId("other_vserverId");
+ assertFalse(actionId1.equals(actionId2));
+ actionId1.setVserverId("vserverId");
+ assertFalse(actionId1.equals(actionId2));
actionId2.setVserverId("vserverId");
- assertEquals(actionId1,actionId2);
- assertEquals(actionId2,actionId1);
+ assertEquals(actionId2, actionId1);
}
@Test