|
4 | 4 | import com.prowidesoftware.swift.model.mx.MxPacs00800108;
|
5 | 5 | import com.prowidesoftware.swift.model.mx.MxReadParams;
|
6 | 6 | import com.prowidesoftware.swift.model.mx.MxWriteConfiguration;
|
7 |
| -import org.junit.jupiter.api.Disabled; |
8 | 7 | import org.junit.jupiter.api.Test;
|
9 |
| -import org.junit.jupiter.api.parallel.Execution; |
10 | 8 |
|
11 |
| -import java.io.UnsupportedEncodingException; |
12 | 9 | import java.lang.reflect.Field;
|
13 | 10 | import java.nio.charset.Charset;
|
14 | 11 | import java.nio.charset.StandardCharsets;
|
15 | 12 |
|
16 | 13 | import static org.junit.jupiter.api.Assertions.assertFalse;
|
17 | 14 | import static org.junit.jupiter.api.Assertions.assertNotNull;
|
18 |
| -import static org.junit.jupiter.api.parallel.ExecutionMode.SAME_THREAD; |
19 | 15 |
|
20 |
| -@Disabled |
21 |
| -@Execution(SAME_THREAD) |
| 16 | +//@Execution(SAME_THREAD) |
22 | 17 | public class IssueJira631Test {
|
23 | 18 |
|
24 | 19 | @Test
|
@@ -64,7 +59,7 @@ void testBusinessAppHeaderV02() throws IllegalAccessException, NoSuchFieldExcept
|
64 | 59 | System.setProperty("file.encoding", currentCharset);
|
65 | 60 | }
|
66 | 61 |
|
67 |
| - @Test //Single thread |
| 62 | + @Test |
68 | 63 | void testMxPacsWithWindowsEncoding() throws IllegalAccessException, NoSuchFieldException {
|
69 | 64 | String currentCharset = Charset.defaultCharset().name();
|
70 | 65 | Field defaultCharset = Charset.class.getDeclaredField("defaultCharset");
|
@@ -281,15 +276,16 @@ void testMxPacsWithIBMEncoding() throws IllegalAccessException, NoSuchFieldExcep
|
281 | 276 | MxPacs00800108 parse = MxPacs00800108.parse(xmlAsString);
|
282 | 277 | assertNotNull(parse);
|
283 | 278 |
|
284 |
| - MxWriteConfiguration mxWriteConfiguration = new MxWriteConfiguration(); |
285 |
| - String modelToStringMsg = parse.message(mxWriteConfiguration); |
| 279 | + String modelToStringMsg = parse.message(); |
| 280 | + System.out.println("Model message with defaultCharset, Cp1141"); |
286 | 281 | System.out.println(modelToStringMsg);
|
287 | 282 | assertFalse(modelToStringMsg.contains("encoding="));
|
288 | 283 |
|
289 | 284 | MxPacs00800108 stringToModelMx = MxPacs00800108.parse(modelToStringMsg);
|
290 | 285 | assertNotNull(stringToModelMx);
|
291 | 286 |
|
292 | 287 | System.setProperty("file.encoding", currentCharset);
|
| 288 | + System.out.println("Charset reset from Cp1141 to " + currentCharset); |
293 | 289 | }
|
294 | 290 |
|
295 | 291 | }
|
0 commit comments