Package org.assertj.core.error
Class ShouldContainCharSequence
java.lang.Object
org.assertj.core.error.BasicErrorMessageFactory
org.assertj.core.error.ShouldContainCharSequence
- All Implemented Interfaces:
ErrorMessageFactory
Creates an error message indicating that an assertion that verifies that a
CharSequence contains another
CharSequence failed.- Author:
- Alex Ruiz, Joel Costigliola, Mikhail Mazursky
-
Field Summary
Fields inherited from class org.assertj.core.error.BasicErrorMessageFactory
arguments, format -
Method Summary
Modifier and TypeMethodDescriptionstatic ErrorMessageFactorycontainsIgnoringNewLines(CharSequence actual, CharSequence[] expectedValues, Set<? extends CharSequence> notFound, ComparisonStrategy comparisonWay) Creates a new.ShouldContainCharSequencestatic ErrorMessageFactoryshouldContain(CharSequence actual, CharSequence sequence) Creates a new.ShouldContainCharSequencestatic ErrorMessageFactoryshouldContain(CharSequence actual, CharSequence[] strings, Set<? extends CharSequence> notFound) Creates a new.ShouldContainCharSequencestatic ErrorMessageFactoryshouldContain(CharSequence actual, CharSequence[] strings, Set<? extends CharSequence> notFound, ComparisonStrategy comparisonStrategy) Creates a new.ShouldContainCharSequencestatic ErrorMessageFactoryshouldContain(CharSequence actual, CharSequence sequence, ComparisonStrategy comparisonStrategy) Creates a new.ShouldContainCharSequencestatic ErrorMessageFactoryshouldContain(Throwable actual, CharSequence sequence) static ErrorMessageFactoryshouldContain(Throwable actual, CharSequence[] sequence, Set<? extends CharSequence> notFound) static ErrorMessageFactoryshouldContainIgnoringCase(CharSequence actual, CharSequence sequence) Creates a new.ShouldContainCharSequencestatic ErrorMessageFactoryshouldContainIgnoringWhitespaces(CharSequence actual, CharSequence[] strings, Set<? extends CharSequence> notFound, ComparisonStrategy comparisonStrategy) Creates a new.ShouldContainCharSequencestatic ErrorMessageFactoryshouldContainIgnoringWhitespaces(CharSequence actual, CharSequence sequence, ComparisonStrategy comparisonStrategy) Creates a new.ShouldContainCharSequenceMethods inherited from class org.assertj.core.error.BasicErrorMessageFactory
create, create, create, equals, hashCode, toString, unquotedString
-
Method Details
-
shouldContain
Creates a new.ShouldContainCharSequence- Parameters:
actual- the actual value in the failed assertion.sequence- the sequence of values expected to be inactual.- Returns:
- the created
ErrorMessageFactory.
-
shouldContain
-
shouldContain
public static ErrorMessageFactory shouldContain(Throwable actual, CharSequence[] sequence, Set<? extends CharSequence> notFound) -
shouldContain
public static ErrorMessageFactory shouldContain(CharSequence actual, CharSequence sequence, ComparisonStrategy comparisonStrategy) Creates a new.ShouldContainCharSequence- Parameters:
actual- the actual value in the failed assertion.sequence- the sequence of values expected to be inactual.comparisonStrategy- theComparisonStrategyused to evaluate assertion.- Returns:
- the created
ErrorMessageFactory.
-
shouldContain
public static ErrorMessageFactory shouldContain(CharSequence actual, CharSequence[] strings, Set<? extends CharSequence> notFound, ComparisonStrategy comparisonStrategy) Creates a new.ShouldContainCharSequence- Parameters:
actual- the actual value in the failed assertion.strings- the sequence of values expected to be inactual.notFound- the values not found.comparisonStrategy- theComparisonStrategyused to evaluate assertion.- Returns:
- the created
ErrorMessageFactory.
-
shouldContain
public static ErrorMessageFactory shouldContain(CharSequence actual, CharSequence[] strings, Set<? extends CharSequence> notFound) Creates a new.ShouldContainCharSequence- Parameters:
actual- the actual value in the failed assertion.strings- the sequence of values expected to be inactual.notFound- the values not found.- Returns:
- the created
ErrorMessageFactory.
-
shouldContainIgnoringCase
public static ErrorMessageFactory shouldContainIgnoringCase(CharSequence actual, CharSequence sequence) Creates a new.ShouldContainCharSequence- Parameters:
actual- the actual value in the failed assertion.sequence- the sequence of values expected to be inactual.- Returns:
- the created
ErrorMessageFactory.
-
shouldContainIgnoringWhitespaces
public static ErrorMessageFactory shouldContainIgnoringWhitespaces(CharSequence actual, CharSequence sequence, ComparisonStrategy comparisonStrategy) Creates a new.ShouldContainCharSequence- Parameters:
actual- the actual value in the failed assertion.sequence- the sequence of values expected to be inactual.comparisonStrategy- theComparisonStrategyused to evaluate assertion.- Returns:
- the created
ErrorMessageFactory.
-
shouldContainIgnoringWhitespaces
public static ErrorMessageFactory shouldContainIgnoringWhitespaces(CharSequence actual, CharSequence[] strings, Set<? extends CharSequence> notFound, ComparisonStrategy comparisonStrategy) Creates a new.ShouldContainCharSequence- Parameters:
actual- the actual value in the failed assertion.strings- the sequence of values expected to be inactual.notFound- the values not found.comparisonStrategy- theComparisonStrategyused to evaluate assertion.- Returns:
- the created
ErrorMessageFactory.
-
containsIgnoringNewLines
public static ErrorMessageFactory containsIgnoringNewLines(CharSequence actual, CharSequence[] expectedValues, Set<? extends CharSequence> notFound, ComparisonStrategy comparisonWay) Creates a new.ShouldContainCharSequence- Parameters:
actual- the actual value in the failed assertion.expectedValues- the sequence of values expected to be inactual.notFound- the values not found.comparisonWay- theComparisonStrategyto evaluate assertion.- Returns:
- the created
ErrorMessageFactory.
-