From 28fa18278c1f3a87722d5e8b78f581526a30bb38 Mon Sep 17 00:00:00 2001 From: Yuuta Liang Date: Sat, 14 Oct 2023 05:35:17 +0800 Subject: Fix lint Signed-off-by: Yuuta Liang --- src/test/model/asn1/PrintableStringTest.java | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/test/model/asn1/PrintableStringTest.java') diff --git a/src/test/model/asn1/PrintableStringTest.java b/src/test/model/asn1/PrintableStringTest.java index f46f400..c6eb7b1 100644 --- a/src/test/model/asn1/PrintableStringTest.java +++ b/src/test/model/asn1/PrintableStringTest.java @@ -21,24 +21,24 @@ public class PrintableStringTest { void testIllegalStrings() { ILLEGAL_CHARS_TO_TEST.chars() .forEach(c -> - assertThrows(ParseException.class, - () -> new PrintableString(PrintableString.TAG, null, Character.toString(c)), - String.format("Expected failing validation by char '%c'.", c)) + assertThrows(ParseException.class, + () -> new PrintableString(PrintableString.TAG, null, Character.toString(c)), + String.format("Expected failing validation by char '%c'.", c)) ); } @Test void testEncode() throws ParseException { assertArrayEquals( - new Byte[] { 0x68, 0x68, 0x68 }, + new Byte[]{0x68, 0x68, 0x68}, new PrintableString(PrintableString.TAG, null, "hhh").encodeValueDER()); assertArrayEquals( - new Byte[] { + new Byte[]{ 0x13, 0x02, // Tag - Length 0x68, 0x69 // Value }, new PrintableString(PrintableString.TAG, null, "hi").encodeDER()); assertArrayEquals( - new Byte[] { + new Byte[]{ -86, 0x05, // Parent Tag - Length 0x13, 0x03, // Inner Tag - Length 0x68, 0x69, 0x69 // Value @@ -50,10 +50,10 @@ public class PrintableStringTest { @Test void testParse() throws ParseException { assertEquals("123", - new PrintableString(new BytesReader(new Byte[]{ 0x13, 3, '1', '2', '3' }), false) + new PrintableString(new BytesReader(new Byte[]{0x13, 3, '1', '2', '3'}), false) .getString()); assertEquals("", - new PrintableString(new BytesReader(new Byte[]{ 0x13, 0, '1', '2', '3' }), false) + new PrintableString(new BytesReader(new Byte[]{0x13, 0, '1', '2', '3'}), false) .getString()); } @@ -61,11 +61,11 @@ public class PrintableStringTest { void testParseFail() { // EOF assertThrows(ParseException.class, () -> - new PrintableString(new BytesReader(new Byte[]{ 0x13, 1 }), false)); + new PrintableString(new BytesReader(new Byte[]{0x13, 1}), false)); // Illegal chars assertThrows(ParseException.class, () -> - new PrintableString(new BytesReader(new Byte[]{ 0x13, 2, '1', '*' }), false)); + new PrintableString(new BytesReader(new Byte[]{0x13, 2, '1', '*'}), false)); assertThrows(ParseException.class, () -> - new PrintableString(new BytesReader(new Byte[]{ 0x13, 2, '1', '@' }), false)); + new PrintableString(new BytesReader(new Byte[]{0x13, 2, '1', '@'}), false)); } } -- cgit v1.2.3