open static fun doesNotContain(@Nullable textToSearch: String, substring: String, message: String): Unit
Assert that the given text does not contain the given substring.
Assert.doesNotContain(name, "rod", "Name must not contain 'rod'");
textToSearch - the text to search
substring - the substring to find within the text
message - the exception message to use if the assertion fails
IllegalArgumentException - if the text contains the substring
open static fun doesNotContain(@Nullable textToSearch: String, substring: String, messageSupplier: Supplier<String>): Unit
Assert that the given text does not contain the given substring.
Assert.doesNotContain(name, forbidden, () -> "Name must not contain '" + forbidden + "'");
textToSearch - the text to search
substring - the substring to find within the text
messageSupplier - a supplier for the exception message to use if the assertion fails
IllegalArgumentException - if the text contains the substring
Since
5.0
open static fun doesNotContain(@Nullable textToSearch: String, substring: String): Unit