public class TestUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static org.apache.commons.lang3.time.FastDateFormat |
ISO_DATETIME_TIME_ZONE_FORMAT
The formatter for ISO8601 date time including milliseconds and time zone.
|
| Constructor and Description |
|---|
TestUtil() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
binaryCompare(InputStream i1,
InputStream i2)
Makes a MD5 compare of two input streams.
|
static String |
getMD5Checksum(InputStream stream)
Calculates the MD5 checksum for a input stream.
|
static Date |
parseJsonDateString(String dateString)
Parses a string representing a date, as it is returned when requesting a node using .json
|
static String |
replaceSpecialCharsForRegexp(String regexp)
Escapes special characters in the string to avoid breaking a regexp
|
public static final org.apache.commons.lang3.time.FastDateFormat ISO_DATETIME_TIME_ZONE_FORMAT
public static Date parseJsonDateString(String dateString) throws org.apache.sling.testing.clients.ClientException
dateString - string representing a dateorg.apache.sling.testing.clients.ClientException - if the string cannot be parsedpublic static String getMD5Checksum(InputStream stream)
stream - the input streampublic static boolean binaryCompare(InputStream i1, InputStream i2)
i1 - First Input Streami2 - Second Input StreamCopyright © 2018. All rights reserved.