summaryrefslogtreecommitdiffstats
path: root/appc-config/appc-config-generator/provider
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2018-08-08 17:50:54 +0530
committerTakamune Cho <tc012c@att.com>2018-08-09 18:02:18 +0000
commit344a44f3bb0762e5bc32a4ef760fb3b42ef4688d (patch)
treeab360228c0f7a6e351cfe7936bbdbe9695aeaf4c /appc-config/appc-config-generator/provider
parent5008b80497d3256b724d54e0b26ad398f050571e (diff)
added test case to testDataTool.java
to increase code coverage Issue-ID: APPC-1086 Change-Id: If736ff2d7cd30f6762ecb6bdc267b4a7c7f51c07 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-config/appc-config-generator/provider')
-rw-r--r--appc-config/appc-config-generator/provider/src/test/java/org/onap/sdnc/config/generator/tool/TestDataTool.java10
1 files changed, 10 insertions, 0 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 aefb7a4b3..b9d96c832 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,6 +6,8 @@
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
+ * Modification 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
@@ -34,6 +36,7 @@ import org.mockito.Mock;
import org.onap.sdnc.config.generator.ConfigGeneratorConstant;
import org.onap.sdnc.config.generator.pattern.TestPatternNode;
import org.powermock.reflect.Whitebox;
+import static org.junit.Assert.assertEquals;
public class TestDataTool {
@@ -151,4 +154,11 @@ public class TestDataTool {
String line = "2017-08-20T17:40:23.100361+00:00";
Whitebox.invokeMethod(logParserTool, "checkDateTime", line);
}
+
+ @Test
+ public void testCheckDataXml()
+ {
+ String data="<xml><configuration</configuration>";
+ assertEquals(ConfigGeneratorConstant.DATA_TYPE_TEXT,CheckDataTool.checkData(data));
+ }
}