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 ErrorMessageFactory
containsIgnoringNewLines
(CharSequence actual, CharSequence[] expectedValues, Set<? extends CharSequence> notFound, org.assertj.core.internal.ComparisonStrategy comparisonWay) Creates a new
.ShouldContainCharSequence
static ErrorMessageFactory
shouldContain
(CharSequence actual, CharSequence sequence) Creates a new
.ShouldContainCharSequence
static ErrorMessageFactory
shouldContain
(CharSequence actual, CharSequence[] strings, Set<? extends CharSequence> notFound) Creates a new
.ShouldContainCharSequence
static ErrorMessageFactory
shouldContain
(CharSequence actual, CharSequence[] strings, Set<? extends CharSequence> notFound, org.assertj.core.internal.ComparisonStrategy comparisonStrategy) Creates a new
.ShouldContainCharSequence
static ErrorMessageFactory
shouldContain
(CharSequence actual, CharSequence sequence, org.assertj.core.internal.ComparisonStrategy comparisonStrategy) Creates a new
.ShouldContainCharSequence
static ErrorMessageFactory
shouldContain
(Throwable actual, CharSequence sequence) static ErrorMessageFactory
shouldContain
(Throwable actual, CharSequence[] sequence, Set<? extends CharSequence> notFound) static ErrorMessageFactory
shouldContainIgnoringCase
(CharSequence actual, CharSequence sequence) Creates a new
.ShouldContainCharSequence
static ErrorMessageFactory
shouldContainIgnoringWhitespaces
(CharSequence actual, CharSequence[] strings, Set<? extends CharSequence> notFound, org.assertj.core.internal.ComparisonStrategy comparisonStrategy) Creates a new
.ShouldContainCharSequence
static ErrorMessageFactory
shouldContainIgnoringWhitespaces
(CharSequence actual, CharSequence sequence, org.assertj.core.internal.ComparisonStrategy comparisonStrategy) Creates a new
.ShouldContainCharSequence
Methods 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, org.assertj.core.internal.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
- theComparisonStrategy
used to evaluate assertion.- Returns:
- the created
ErrorMessageFactory
.
-
shouldContain
public static ErrorMessageFactory shouldContain(CharSequence actual, CharSequence[] strings, Set<? extends CharSequence> notFound, org.assertj.core.internal.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
- theComparisonStrategy
used 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, org.assertj.core.internal.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
- theComparisonStrategy
used to evaluate assertion.- Returns:
- the created
ErrorMessageFactory
.
-
shouldContainIgnoringWhitespaces
public static ErrorMessageFactory shouldContainIgnoringWhitespaces(CharSequence actual, CharSequence[] strings, Set<? extends CharSequence> notFound, org.assertj.core.internal.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
- theComparisonStrategy
used to evaluate assertion.- Returns:
- the created
ErrorMessageFactory
.
-
containsIgnoringNewLines
public static ErrorMessageFactory containsIgnoringNewLines(CharSequence actual, CharSequence[] expectedValues, Set<? extends CharSequence> notFound, org.assertj.core.internal.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
- theComparisonStrategy
to evaluate assertion.- Returns:
- the created
ErrorMessageFactory
.
-