Class ShouldContainSubsequenceOfCharSequence

java.lang.Object
org.assertj.core.error.BasicErrorMessageFactory
org.assertj.core.error.ShouldContainSubsequenceOfCharSequence
All Implemented Interfaces:
ErrorMessageFactory

public class ShouldContainSubsequenceOfCharSequence extends BasicErrorMessageFactory
Creates an error message indicating that an assertion that verifies that a CharSequence contains a Subsequence of several CharSequences in order failed.
Author:
Joel Costigliola, Mikhail Mazursky
  • Method Details

    • shouldContainSubsequence

      public static ErrorMessageFactory shouldContainSubsequence(CharSequence actual, CharSequence[] strings, int firstBadOrderIndex)
      Parameters:
      actual - the actual value in the failed assertion.
      strings - the sequence of values expected to be in actual.
      firstBadOrderIndex - first index failing the subsequence.
      Returns:
      the created ErrorMessageFactory.
    • shouldContainSubsequence

      public static ErrorMessageFactory shouldContainSubsequence(CharSequence actual, CharSequence[] strings, int badOrderIndex, org.assertj.core.internal.ComparisonStrategy comparisonStrategy)
      Parameters:
      actual - the actual value in the failed assertion.
      strings - the sequence of values expected to be in actual.
      badOrderIndex - index failing the subsequence.
      comparisonStrategy - the ComparisonStrategy used to evaluate assertion.
      Returns:
      the created ErrorMessageFactory.
    • shouldContainSubsequence

      public static ErrorMessageFactory shouldContainSubsequence(CharSequence actual, CharSequence[] strings, Map<CharSequence,Integer> notFoundRepeatedSubsequence, org.assertj.core.internal.ComparisonStrategy comparisonStrategy)
      Creates a new ShouldContainSubsequenceOfCharSequence with detailed error messages about missing subsequences.
      Parameters:
      actual - the actual value in the failed assertion.
      strings - the sequence of values expected to be in actual.
      notFoundRepeatedSubsequence - a map where each key is a subsequence of strings that was expected to be found in actual and the corresponding value is the number of times it was expected but not found.
      comparisonStrategy - the ComparisonStrategy used to evaluate assertion.
      Returns:
      the created ErrorMessageFactory.