summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2018-11-27 17:12:28 +0530
committerTakamune Cho <takamune.cho@att.com>2018-11-28 01:44:25 +0000
commitf4b355eb2aa690ef37a66d76f6849a8828af0489 (patch)
treea3ff0d389a6bc3bd9a2d9730181f38a3ce8422a2
parent392d09b471ad297dfa1222d10a95f33e6aeb6af9 (diff)
added test case to TestDataTool.java
to increase code coverage Issue-ID: APPC-1086 Change-Id: If4e5bacbfe63bca2d0859f2f86623044c6cba3a2 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
-rw-r--r--appc-config/appc-config-generator/provider/src/test/java/org/onap/sdnc/config/generator/tool/TestDataTool.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/appc-config/appc-config-generator/provider/src/test/java/org/onap/sdnc/config/generator/tool/TestDataTool.java b/appc-config/appc-config-generator/provider/src/test/java/org/onap/sdnc/config/generator/tool/TestDataTool.java
index b9d96c832..3d7b7fb84 100644
--- a/appc-config/appc-config-generator/provider/src/test/java/org/onap/sdnc/config/generator/tool/TestDataTool.java
+++ b/appc-config/appc-config-generator/provider/src/test/java/org/onap/sdnc/config/generator/tool/TestDataTool.java
@@ -6,7 +6,7 @@
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
- * Modification Copyright (C) 2018 IBM.
+ * 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.
@@ -156,9 +156,16 @@ public class TestDataTool {
}
@Test
- public void testCheckDataXml()
+ public void testCheckDataForInvalidXml()
{
String data="<xml><configuration</configuration>";
assertEquals(ConfigGeneratorConstant.DATA_TYPE_TEXT,CheckDataTool.checkData(data));
}
+
+ @Test
+ public void testCheckDataForValidXml()
+ {
+ String data="<xml><configuration></configuration></xml>";
+ assertEquals(ConfigGeneratorConstant.DATA_TYPE_XML,CheckDataTool.checkData(data));
+ }
}