public class StringAsserts extends Object
Constructor and Description |
---|
StringAsserts() |
Modifier and Type | Method and Description |
---|---|
static void |
assertStringContains(String msg,
String toCheck,
String... contents)
Asserts that one string contains a set of substrings
|
static void |
assertStringContains(String msg,
String toFind,
String toCheck)
Assert that one string contains another.
|
static void |
assertStringMatches(String msg,
String toFind,
String toCheck)
Assert that a string matches a regular expression.
|
static void |
assertStringNotContains(String msg,
String toFind,
String toCheck)
Assert that one string doesn not contain another.
|
public StringAsserts()
public static void assertStringContains(String msg, String toFind, String toCheck)
msg
- the error message to show in case of failuretoFind
- The string to find.toCheck
- The string to look inpublic static void assertStringContains(String msg, String toCheck, String... contents)
msg
- the error message to show in case of failuretoCheck
- The string to look incontents
- the strings to look forpublic static void assertStringMatches(String msg, String toFind, String toCheck)
msg
- the error message to show in case of failuretoFind
- The string to findtoCheck
- The string to look inpublic static void assertStringNotContains(String msg, String toFind, String toCheck)
msg
- the error message to show in case of failuretoFind
- The string to find.toCheck
- The string to look inCopyright © 2005–2015 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.