Skip to content

Commit 1ac67d3

Browse files
committed
test no longer prints to stdout
1 parent 693d100 commit 1ac67d3

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

src/test/java/de/rub/nds/modifiablevariable/util/IllegalStringAdapterTest.java

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,22 @@
1616

1717
package de.rub.nds.modifiablevariable.util;
1818

19-
import java.nio.charset.Charset;
2019
import java.nio.charset.StandardCharsets;
2120
import java.util.Arrays;
2221
import org.apache.commons.lang.StringEscapeUtils;
22+
import org.apache.logging.log4j.LogManager;
23+
import org.apache.logging.log4j.Logger;
2324
import org.junit.After;
2425
import org.junit.AfterClass;
2526
import org.junit.Before;
2627
import org.junit.BeforeClass;
2728
import org.junit.Test;
2829
import static org.junit.Assert.*;
2930

30-
/**
31-
*
32-
* @author ic0ns
33-
*/
3431
public class IllegalStringAdapterTest {
3532

33+
private Logger LOGGER = LogManager.getLogger();
34+
3635
public IllegalStringAdapterTest() {
3736
}
3837

@@ -62,14 +61,13 @@ public void testUnmarshal() {
6261
for (int i = 0; i < data.length; i++) {
6362
data[i] = (byte) i;
6463
}
65-
// System.out.println("Plain: " + new String(data, StandardCharsets.US_ASCII));
66-
System.out.println(Arrays.toString(new String(data, StandardCharsets.ISO_8859_1)
67-
.getBytes(StandardCharsets.ISO_8859_1)));
64+
LOGGER.info("Bytes :"
65+
+ Arrays.toString(new String(data, StandardCharsets.ISO_8859_1).getBytes(StandardCharsets.ISO_8859_1)));
6866
String marshal = instance.marshal(new String(data, StandardCharsets.ISO_8859_1));
69-
System.out.println("Marshal: " + marshal);
67+
LOGGER.info("Marshal: " + marshal);
7068
String unmarshal = instance.unmarshal(marshal);
71-
System.out.println(StringEscapeUtils.unescapeXml(unmarshal));
72-
System.out.println("Unmarshal: " + unmarshal);
69+
LOGGER.info("Unescaped:" + StringEscapeUtils.unescapeXml(unmarshal));
70+
LOGGER.info("Unmarshal: " + unmarshal);
7371
assertArrayEquals(data, unmarshal.getBytes(StandardCharsets.ISO_8859_1));
7472
}
7573
}

0 commit comments

Comments
 (0)