added test case to TestStructuredPropertyHelper 39/58939/3
authorSandeep J <sandeejh@in.ibm.com>
Fri, 3 Aug 2018 13:06:41 +0000 (18:36 +0530)
committerTakamune Cho <tc012c@att.com>
Fri, 3 Aug 2018 20:56:34 +0000 (20:56 +0000)
to increase code coverage

Issue-ID: APPC-1086
Change-Id: I00237d24ef2fac893e7c1867e4aa38ba026e9a16
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
appc-common/src/test/java/org/onap/appc/util/TestStructuredPropertyHelper.java

index c38ccef..11938f1 100644 (file)
@@ -6,6 +6,8 @@
  * ================================================================================
  * Copyright (C) 2017 Amdocs
  * =============================================================================
+ * 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
@@ -232,4 +234,17 @@ public class TestStructuredPropertyHelper {
         }
         // System.out.println(nodes);
     }
+    
+    @Test
+    public void testToStringWithValue()
+    {
+        nodes = StructuredPropertyHelper.getStructuredProperties(properties, "node");
+        Node node = nodes.get(0);
+        node.setName("testName");
+        node.setValue("testValue");
+        String str= node.toString();
+        assertEquals("testName = testValue",str);
+    }
+    
+   
 }