Package de.unkrig.commons.junit4
Class AssertString
- java.lang.Object
-
- de.unkrig.commons.junit4.AssertString
-
public final class AssertString extends Object
Utility methods related to JUNIT andjava.lang.Strings.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidassertContains(String expectedInfix, String actual)Fails unless the actual string contains the given expectedInfix.static voidassertContains(String message, String expectedInfix, String actual)Fails with the given message unless the actual string matches the given expectedRegex.static voidassertContains(String message, List<String> expectedInfixes, List<String> actuals)Fails with the given message unless each of the actuals contains the respective infix.static voidassertContains(List<String> expectedInfixes, List<String> actuals)Fails unless each of the actuals contains the respective infix.
-
-
-
Method Detail
-
assertContains
public static void assertContains(String expectedInfix, String actual)
Fails unless the actual string contains the given expectedInfix.
-
assertContains
public static void assertContains(@Nullable String message, String expectedInfix, String actual)Fails with the given message unless the actual string matches the given expectedRegex.
-
assertContains
public static void assertContains(List<String> expectedInfixes, List<String> actuals)
Fails unless each of the actuals contains the respective infix.
-
-