1
1
2
2
package io .sloeber .junit ;
3
3
4
+ import static io .sloeber .autoBuild .helpers .api .AutoBuildConstants .*;
4
5
import static io .sloeber .core .txt .WorkAround .*;
5
6
import static org .junit .Assert .*;
6
7
import static org .junit .Assume .*;
7
8
8
9
import java .io .File ;
9
- import java .nio .charset .Charset ;
10
10
import java .util .Collection ;
11
11
import java .util .LinkedList ;
12
12
import org .apache .commons .io .FileUtils ;
@@ -81,9 +81,9 @@ public void boardsTxt() throws Exception {
81
81
System .out .println ("file does not exists " + expectedFile );
82
82
assumeFalse (true );// skip the test
83
83
}
84
- String input = FileUtils .readFileToString (inputFile , Charset . defaultCharset () );
84
+ String input = FileUtils .readFileToString (inputFile , AUTOBUILD_CONFIG_FILE_CHARSET );
85
85
input = input .replace ("\r \n " , "\n " );
86
- String expected = FileUtils .readFileToString (expectedFile , Charset . defaultCharset () );
86
+ String expected = FileUtils .readFileToString (expectedFile , AUTOBUILD_CONFIG_FILE_CHARSET );
87
87
String actual = boardsApplyWorkArounds (input );
88
88
String cleanedExpected = clean (expected );
89
89
String cleanedActual = clean (actual );
@@ -108,7 +108,7 @@ public void platformTxt() throws Exception {
108
108
System .out .println ("file does not exists " + inputFile );
109
109
assumeFalse (true );// skip the test
110
110
}
111
- String input = FileUtils .readFileToString (inputFile , Charset . defaultCharset () );
111
+ String input = FileUtils .readFileToString (inputFile , AUTOBUILD_CONFIG_FILE_CHARSET );
112
112
input = input .replace ("\r \n " , "\n " );
113
113
String currentWorkAround = platformApplyWorkArounds (input , inputFile );
114
114
String cleanedCurrentWorkAround = clean (currentWorkAround );
@@ -119,7 +119,7 @@ public void platformTxt() throws Exception {
119
119
assumeFalse (true );// skip the test
120
120
}
121
121
122
- String expected = FileUtils .readFileToString (expectedFile , Charset . defaultCharset () );
122
+ String expected = FileUtils .readFileToString (expectedFile , AUTOBUILD_CONFIG_FILE_CHARSET );
123
123
String cleanedExpected = clean (expected );
124
124
125
125
if (!cleanedExpected .equals (cleanedCurrentWorkAround )) {
@@ -146,9 +146,9 @@ public void programmerTxt() throws Exception {
146
146
System .out .println ("file does not exists " + expectedFile );
147
147
return ;
148
148
}
149
- String input = FileUtils .readFileToString (inputFile , Charset . defaultCharset () );
149
+ String input = FileUtils .readFileToString (inputFile , AUTOBUILD_CONFIG_FILE_CHARSET );
150
150
input = input .replace ("\r \n " , "\n " );
151
- String expected = FileUtils .readFileToString (expectedFile , Charset . defaultCharset () );
151
+ String expected = FileUtils .readFileToString (expectedFile ,AUTOBUILD_CONFIG_FILE_CHARSET );
152
152
String actual = programmersApplyWorkArounds (input );
153
153
String cleanedExpected = clean (expected );
154
154
String cleanedActual = clean (actual );
0 commit comments