summaryrefslogtreecommitdiffstats
path: root/appc-common
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2018-08-06 16:27:51 +0530
committerTakamune Cho <tc012c@att.com>2018-08-06 23:38:16 +0000
commit40a4719e58b4e1af57e1cfc208b24efca35979a5 (patch)
treec0afe87fb39aac2ed91277494c80d2ebb89125dc /appc-common
parent343b1b67b04e41547963faa72134cb8970168051 (diff)
added test case to TestStructuredPropertyHelper
to increase code coverage Issue-ID: APPC-1086 Change-Id: I27a84f312fcdaed2ff85c686d2fa2e39884b6224 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-common')
-rw-r--r--appc-common/src/test/java/org/onap/appc/util/TestStructuredPropertyHelper.java36
1 files changed, 35 insertions, 1 deletions
diff --git a/appc-common/src/test/java/org/onap/appc/util/TestStructuredPropertyHelper.java b/appc-common/src/test/java/org/onap/appc/util/TestStructuredPropertyHelper.java
index 11938f124..e61531a8b 100644
--- a/appc-common/src/test/java/org/onap/appc/util/TestStructuredPropertyHelper.java
+++ b/appc-common/src/test/java/org/onap/appc/util/TestStructuredPropertyHelper.java
@@ -246,5 +246,39 @@ public class TestStructuredPropertyHelper {
assertEquals("testName = testValue",str);
}
-
+ @Test
+ public void testEquals()
+ {
+ Node node0 = new Node();
+ node0.setName("testName");
+ node0.setValue("testValue");
+ Node node1 = new Node();
+ node1.setName("testName");
+ node1.setValue("testValue");
+ assertTrue(node0.equals(node1));
+ }
+
+ @Test
+ public void testEqualsWithSameNameAndDifferentValue()
+ {
+ Node node0 = new Node();
+ node0.setName("testName");
+ node0.setValue("testValue1");
+ Node node1 = new Node();
+ node1.setName("testName");
+ node1.setValue("testValue2");
+ assertFalse(node0.equals(node1));
+ }
+
+ @Test
+ public void testEqualsWithSameValueAndDifferentName()
+ {
+ Node node0 = new Node();
+ node0.setName("testName1");
+ node0.setValue("testValue");
+ Node node1 = new Node();
+ node1.setName("testName2");
+ node1.setValue("testValue");
+ assertFalse(node0.equals(node1));
+ }
}