@Beta @GwtCompatible public final class EscaperAsserts extends java.lang.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,
java.lang.String expected,
char c)
Asserts that an escaper escapes the given character into the expected string.
|
static void |
assertEscaping(UnicodeEscaper escaper,
java.lang.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,
java.lang.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 java.io.IOException
escaper
- the non-null escaper to testjava.io.IOException
public static void assertEscaping(CharEscaper escaper, java.lang.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, java.lang.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, java.lang.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-2018. All Rights Reserved.