@Beta @GwtCompatible public final class EscaperAsserts extends Object
Modifier and Type | Method and Description |
---|---|
static void |
assertBasic(Escaper escaper)
Asserts that an escaper behaves correctly with respect to null inputs.
|
static void |
assertEscaping(CharEscaper escaper,
String expected,
char c)
Asserts that an escaper escapes the given character into the expected
string.
|
static void |
assertEscaping(UnicodeEscaper escaper,
String expected,
int cp)
Asserts that a Unicode escaper escapes the given code point into the
expected string.
|
static void |
assertUnescaped(CharEscaper escaper,
char c)
Asserts that an escaper does not escape the given character.
|
static void |
assertUnescaped(UnicodeEscaper escaper,
int cp)
Asserts that a Unicode escaper does not escape the given character.
|
static void |
assertUnicodeEscaping(UnicodeEscaper escaper,
String expected,
char hi,
char lo)
Asserts that a Unicode escaper escapes the given hi/lo surrogate pair into
the expected string.
|
public static void assertBasic(Escaper escaper) throws IOException
escaper
- the non-null escaper to testIOException
public static void assertEscaping(CharEscaper escaper, String expected, char c)
escaper
- the non-null escaper to testexpected
- the expected output stringc
- the character to escapepublic static void assertUnescaped(CharEscaper escaper, char c)
escaper
- the non-null escaper to testc
- the character to testpublic static void assertEscaping(UnicodeEscaper escaper, String expected, int cp)
escaper
- the non-null escaper to testexpected
- the expected output stringcp
- the Unicode code point to escapepublic static void assertUnescaped(UnicodeEscaper escaper, int cp)
escaper
- the non-null escaper to testcp
- the Unicode code point to testpublic static void assertUnicodeEscaping(UnicodeEscaper escaper, String expected, char hi, char lo)
escaper
- the non-null escaper to testexpected
- the expected output stringhi
- the high surrogate pair characterlo
- the low surrogate pair characterCopyright © 2010–2019. All rights reserved.