public class AssertUtils extends Object
AssertUtils class.
| Modifier and Type | Field and Description |
|---|---|
static File |
FAILED_FILES_DIR
The directory where the files have been stored
|
| Modifier and Type | Method and Description |
|---|---|
static void |
assertEquals(URL expectedResourceUri,
Object actual)
assertEquals
|
static void |
assertEquals(URL expectedResourceUri,
Object actual,
Charset charset) |
static void |
assertFileByHash(Class<?> testClass,
String testMethodName,
com.cedarsoft.crypt.Hash expected,
File fileUnderTest) |
static void |
assertFileByHash(com.cedarsoft.crypt.Hash expected,
File fileUnderTest) |
static void |
assertFileByHash(String path,
com.cedarsoft.crypt.Hash expected,
File fileUnderTest) |
static void |
assertFileByHash(String path,
Iterable<? extends com.cedarsoft.crypt.Hash> expectedHashes,
File fileUnderTest) |
static void |
assertFileByHashes(File fileUnderTest,
com.cedarsoft.crypt.Algorithm algorithm,
String... expectedHashesAsHex) |
static void |
assertFileByHashes(File fileUnderTest,
com.cedarsoft.crypt.Hash... expectedHashes) |
static <T> void |
assertOne(T current,
T... expectedAlternatives)
assertOne
|
static void |
assertXMLEquals(String control,
String test)
assertXMLEqual
|
static void |
assertXMLEquals(String control,
String test,
boolean ignoreWhiteSpace)
assertXMLEqual
|
static void |
assertXMLEquals(String control,
String test,
boolean ignoreWhiteSpace,
boolean ignoreComments) |
static void |
assertXMLEquals(String err,
String control,
String test,
boolean ignoreWhiteSpace)
Deprecated.
|
static void |
assertXMLEquals(String err,
String control,
String test,
boolean ignoreWhiteSpace,
boolean ignoreComments)
Deprecated.
|
static void |
assertXMLEquals(String test,
String err,
URL control,
boolean ignoreWhiteSpace)
Deprecated.
|
static void |
assertXMLEquals(String test,
String err,
URL control,
boolean ignoreWhiteSpace,
Charset charset)
Deprecated.
|
static void |
assertXMLEquals(URL control,
String test) |
static void |
assertXMLEquals(URL control,
String test,
boolean ignoreWhiteSpace) |
static void |
assertXMLEquals(URL control,
String test,
boolean ignoreWhiteSpace,
Charset charset) |
static void |
assertXMLEquals(URL control,
String test,
Charset charset) |
static String |
createPath(Class<?> testClass,
String testMethodName) |
static String |
guessPathFromStackTrace() |
static void |
setIgnoreComments(boolean ignore) |
static void |
setIgnoreWhitespace(boolean ignore)
setIgnoreWhitespace
|
public static void setIgnoreWhitespace(boolean ignore)
setIgnoreWhitespace
ignore - a boolean.public static void setIgnoreComments(boolean ignore)
public static void assertXMLEquals(String control, String test) throws SAXException, IOException
assertXMLEqual
control - a String object.test - a String object.SAXException - if any.IOException - if any.public static void assertXMLEquals(URL control, String test) throws SAXException, IOException
SAXExceptionIOExceptionpublic static void assertXMLEquals(URL control, String test, @Nonnull Charset charset) throws SAXException, IOException
SAXExceptionIOExceptionpublic static void assertXMLEquals(String control, String test, boolean ignoreWhiteSpace) throws SAXException, IOException
assertXMLEqual
control - a String object.test - a String object.ignoreWhiteSpace - a boolean.SAXException - if any.IOException - if any.public static void assertXMLEquals(URL control, String test, boolean ignoreWhiteSpace) throws SAXException, IOException
SAXExceptionIOExceptionpublic static void assertXMLEquals(URL control, String test, boolean ignoreWhiteSpace, @Nonnull Charset charset) throws SAXException, IOException
SAXExceptionIOException@Deprecated public static void assertXMLEquals(@Nullable String err, @Nonnull String control, @Nonnull String test, boolean ignoreWhiteSpace) throws SAXException, IOException
assertXMLEqual
err - a String object.control - a String object.test - a String object.ignoreWhiteSpace - a boolean.SAXException - if any.IOException - if any.@Deprecated public static void assertXMLEquals(@Nullable String err, @Nonnull String control, @Nonnull String test, boolean ignoreWhiteSpace, boolean ignoreComments) throws SAXException, IOException
SAXExceptionIOExceptionpublic static void assertXMLEquals(@Nonnull String control, @Nonnull String test, boolean ignoreWhiteSpace, boolean ignoreComments) throws IOException
IOException@Deprecated public static void assertXMLEquals(@Nonnull String test, @Nonnull String err, @Nonnull URL control, boolean ignoreWhiteSpace) throws SAXException, IOException
SAXExceptionIOException@Deprecated public static void assertXMLEquals(@Nonnull String test, @Nonnull String err, @Nonnull URL control, boolean ignoreWhiteSpace, @Nonnull Charset charset) throws SAXException, IOException
SAXExceptionIOExceptionpublic static <T> void assertOne(@Nullable T current, @Nonnull T... expectedAlternatives)
assertOne
current - a Object object.expectedAlternatives - a Object object.public static void assertEquals(@Nonnull URL expectedResourceUri, @Nullable Object actual) throws IOException
assertEquals
expectedResourceUri - a URL object.actual - a Object object.IOException - if any.public static void assertEquals(@Nonnull URL expectedResourceUri, @Nullable Object actual, @Nonnull Charset charset) throws IOException
IOExceptionpublic static void assertFileByHashes(@Nonnull File fileUnderTest, @Nonnull com.cedarsoft.crypt.Algorithm algorithm, @Nonnull String... expectedHashesAsHex) throws IOException
IOExceptionpublic static void assertFileByHashes(@Nonnull File fileUnderTest, @Nonnull com.cedarsoft.crypt.Hash... expectedHashes) throws IOException
IOExceptionpublic static void assertFileByHash(@Nonnull com.cedarsoft.crypt.Hash expected, @Nonnull File fileUnderTest) throws IOException
IOExceptionpublic static void assertFileByHash(@Nonnull Class<?> testClass, @Nonnull String testMethodName, @Nonnull com.cedarsoft.crypt.Hash expected, @Nonnull File fileUnderTest) throws IOException
IOException@Nonnull public static String createPath(@Nonnull Class<?> testClass, @Nonnull String testMethodName)
public static void assertFileByHash(@Nonnull String path, @Nonnull com.cedarsoft.crypt.Hash expected, @Nonnull File fileUnderTest) throws IOException
IOExceptionpublic static void assertFileByHash(@Nonnull String path, @Nonnull Iterable<? extends com.cedarsoft.crypt.Hash> expectedHashes, @Nonnull File fileUnderTest) throws IOException
IOExceptionCopyright © 2007–2016 cedarsoft GmbH. All rights reserved.