Class AssertString


  • public final class AssertString
    extends Object
    Utility methods related to JUNIT and java.lang.Strings.
    • 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.
      • assertContains

        public static void assertContains​(@Nullable
                                          String message,
                                          List<String> expectedInfixes,
                                          List<String> actuals)
        Fails with the given message unless each of the actuals contains the respective infix.