Remove apex-pdp TextFileUtils class
[policy/apex-pdp.git] / auth / cli-editor / src / test / java / org / onap / policy / apex / auth / clieditor / CommandLineEditorOptionsTest.java
index 227cb23..a5362a8 100644 (file)
@@ -1,19 +1,20 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ *  Modifications Copyright (C) 2019-2020 Nordix Foundation.
  * ================================================================================
  * 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
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * 
+ *
  * SPDX-License-Identifier: Apache-2.0
  * ============LICENSE_END=========================================================
  */
@@ -31,7 +32,7 @@ import java.io.PrintStream;
 
 import org.junit.Test;
 import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
-import org.onap.policy.apex.model.utilities.TextFileUtils;
+import org.onap.policy.common.utils.resources.TextFileUtils;
 
 /**
  * The Class TestCLIEditorOptions.
@@ -53,7 +54,7 @@ public class CommandLineEditorOptionsTest {
         final File tempModelFile = File.createTempFile("ShellPolicyModel", ".json");
 
         final String[] cliArgs = new String[] {"-c", "src/main/resources/examples/scripts/ShellPolicyModel.apex", "-l",
-                tempLogFile.getAbsolutePath(), "-o", tempModelFile.getAbsolutePath()};
+            tempLogFile.getAbsolutePath(), "-o", tempModelFile.getAbsolutePath()};
 
         final ApexCommandLineEditorMain cliEditor = new ApexCommandLineEditorMain(cliArgs);
         assertEquals(0, cliEditor.getErrorCount());
@@ -67,7 +68,7 @@ public class CommandLineEditorOptionsTest {
         final int modelCharCount = modelString.replaceAll("\\s+", "").length();
 
         assertEquals(1204, logCharCount);
-        assertEquals(2924, modelCharCount);
+        assertEquals(2561, modelCharCount);
 
         tempLogFile.delete();
         tempModelFile.delete();
@@ -85,7 +86,7 @@ public class CommandLineEditorOptionsTest {
         final File tempModelFile = File.createTempFile("ShellPolicyModel", ".json");
 
         final String[] cliArgs = new String[] {"-c", "src/main/resources/examples/scripts/ShellPolicyModel.apex", "-l",
-                tempLogFile.getAbsolutePath(), "-o", tempModelFile.getAbsolutePath(), "-nl", "-nm"};
+            tempLogFile.getAbsolutePath(), "-o", tempModelFile.getAbsolutePath(), "-nl", "-nm"};
 
         final ApexCommandLineEditorMain cliEditor = new ApexCommandLineEditorMain(cliArgs);
         assertEquals(0, cliEditor.getErrorCount());
@@ -117,7 +118,7 @@ public class CommandLineEditorOptionsTest {
         final File tempModelFile = File.createTempFile("ShellPolicyModel", ".json");
 
         final String[] cliArgs = new String[] {"-c", "src/main/resources/examples/scripts/ShellPolicyModel.apex", "-l",
-                tempLogFile.getAbsolutePath(), "-o", tempModelFile.getAbsolutePath(), "-nm"};
+            tempLogFile.getAbsolutePath(), "-o", tempModelFile.getAbsolutePath(), "-nm"};
 
         final ApexCommandLineEditorMain cliEditor = new ApexCommandLineEditorMain(cliArgs);
         assertEquals(0, cliEditor.getErrorCount());
@@ -150,7 +151,7 @@ public class CommandLineEditorOptionsTest {
         final File tempModelFile = File.createTempFile("ShellPolicyModel", ".json");
 
         final String[] cliArgs = new String[] {"-c", "src/main/resources/examples/scripts/ShellPolicyModel.apex", "-l",
-                tempLogFile.getAbsolutePath(), "-o", tempModelFile.getAbsolutePath(), "-nl"};
+            tempLogFile.getAbsolutePath(), "-o", tempModelFile.getAbsolutePath(), "-nl"};
 
         final ApexCommandLineEditorMain cliEditor = new ApexCommandLineEditorMain(cliArgs);
         assertEquals(0, cliEditor.getErrorCount());
@@ -164,7 +165,7 @@ public class CommandLineEditorOptionsTest {
         final int modelCharCount = modelString.replaceAll("\\s+", "").length();
 
         assertEquals(0, logCharCount);
-        assertEquals(2924, modelCharCount);
+        assertEquals(2561, modelCharCount);
 
         tempLogFile.delete();
         tempModelFile.delete();
@@ -249,7 +250,7 @@ public class CommandLineEditorOptionsTest {
         final int tempModelFileInCharCount = tempModelFileInString.replaceAll("\\s+", "").length();
 
         assertEquals(1204, tempLogFileInCharCount);
-        assertEquals(2924, tempModelFileInCharCount);
+        assertEquals(2561, tempModelFileInCharCount);
 
         final String[] cliArgsOut = new String[] {"-i", tempModelFileIn.getAbsolutePath(), "-c",
             "src/main/resources/examples/scripts/ShellPolicyModelAddSchema.apex", "-l",
@@ -267,7 +268,7 @@ public class CommandLineEditorOptionsTest {
         final int tempModelFileOutCharCount = tempModelFileOutString.replaceAll("\\s+", "").length();
 
         assertEquals(1154, tempLogFileOutCharCount);
-        assertEquals(3356, tempModelFileOutCharCount);
+        assertEquals(2993, tempModelFileOutCharCount);
 
         tempLogFileIn.delete();
         tempModelFileIn.delete();