added test case to testDataTool.java 65/59665/2
authorSandeep J <sandeejh@in.ibm.com>
Wed, 8 Aug 2018 12:20:54 +0000 (17:50 +0530)
committerTakamune Cho <tc012c@att.com>
Thu, 9 Aug 2018 18:02:18 +0000 (18:02 +0000)
to increase code coverage

Issue-ID: APPC-1086
Change-Id: If736ff2d7cd30f6762ecb6bdc267b4a7c7f51c07
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
appc-config/appc-config-generator/provider/src/test/java/org/onap/sdnc/config/generator/tool/TestDataTool.java

index aefb7a4..b9d96c8 100644 (file)
@@ -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));
+    }
 }