@Beta @GwtCompatible public final class EscaperAsserts extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
assertBasic(com.google.common.escape.Escaper escaper)
Asserts that an escaper behaves correctly with respect to null inputs.
|
static void |
assertEscaping(com.google.common.escape.CharEscaper escaper,
String expected,
char c)
Asserts that an escaper escapes the given character into the expected string.
|
static void |
assertEscaping(com.google.common.escape.UnicodeEscaper escaper,
String expected,
int cp)
Asserts that a Unicode escaper escapes the given code point into the expected string.
|
static void |
assertUnescaped(com.google.common.escape.CharEscaper escaper,
char c)
Asserts that an escaper does not escape the given character.
|
static void |
assertUnescaped(com.google.common.escape.UnicodeEscaper escaper,
int cp)
Asserts that a Unicode escaper does not escape the given character.
|
static void |
assertUnicodeEscaping(com.google.common.escape.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(com.google.common.escape.Escaper escaper) throws IOException
escaper - the non-null escaper to testIOExceptionpublic static void assertEscaping(com.google.common.escape.CharEscaper escaper, String expected, char c)
escaper - the non-null escaper to testexpected - the expected output stringc - the character to escapepublic static void assertEscaping(com.google.common.escape.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(com.google.common.escape.CharEscaper escaper, char c)
escaper - the non-null escaper to testc - the character to testpublic static void assertUnescaped(com.google.common.escape.UnicodeEscaper escaper, int cp)
escaper - the non-null escaper to testcp - the Unicode code point to testpublic static void assertUnicodeEscaping(com.google.common.escape.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.