Top Description Fields Constructors Methods
org.assertj.core.error

public Class ShouldContainCharSequence

extends BasicErrorMessageFactory
Class Inheritance
Static Imports
org.assertj.core.util.Strings.escapePercent, .Throwables.getStackTrace

Creates an error message indicating that an assertion that verifies that a CharSequence contains another CharSequence failed.
Authors
Alex Ruiz, Joel Costigliola, Mikhail Mazursky

Field Summary

Inherited from org.assertj.core.error.BasicErrorMessageFactory:
argumentsformatformatter

Constructor Summary

AccessConstructor and Description
private
ShouldContainCharSequence(String format, CharSequence actual, CharSequence sequence, ComparisonStrategy comparisonStrategy)

private
ShouldContainCharSequence(String format, CharSequence actual, CharSequence[] values, Set<? extends CharSequence> notFound, ComparisonStrategy comparisonStrategy)

Method Summary

Modifier and TypeMethod and Description
public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
containsIgnoringNewLines
(final CharSequence
the actual value in the failed assertion.
actual
,
final CharSequence[]
the sequence of values expected to be in actual.
expectedValues
,
final Set<? extends CharSequence>
the values not found.
notFound
,
final ComparisonStrategy
the ComparisonStrategy to evaluate assertion.
comparisonWay
)

Creates a new ShouldContainCharSequence.

public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldContain
(CharSequence
the actual value in the failed assertion.
actual
,
CharSequence
the sequence of values expected to be in actual.
sequence
)

Creates a new ShouldContainCharSequence.

public static ErrorMessageFactory
public static ErrorMessageFactory
shouldContain(Throwable actual, CharSequence[] sequence, Set<? extends CharSequence> notFound)

public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldContain
(CharSequence
the actual value in the failed assertion.
actual
,
CharSequence
the sequence of values expected to be in actual.
sequence
,
ComparisonStrategy
the ComparisonStrategy used to evaluate assertion.
comparisonStrategy
)

Creates a new ShouldContainCharSequence.

public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldContain
(CharSequence
the actual value in the failed assertion.
actual
,
CharSequence[]
the sequence of values expected to be in actual.
strings
,
Set<? extends CharSequence>
the values not found.
notFound
,
ComparisonStrategy
the ComparisonStrategy used to evaluate assertion.
comparisonStrategy
)

Creates a new ShouldContainCharSequence.

public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldContain
(CharSequence
the actual value in the failed assertion.
actual
,
CharSequence[]
the sequence of values expected to be in actual.
strings
,
Set<? extends CharSequence>
the values not found.
notFound
)

Creates a new ShouldContainCharSequence.

public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldContainIgnoringCase
(CharSequence
the actual value in the failed assertion.
actual
,
CharSequence
the sequence of values expected to be in actual.
sequence
)

Creates a new ShouldContainCharSequence.

public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldContainIgnoringWhitespaces
(CharSequence
the actual value in the failed assertion.
actual
,
CharSequence
the sequence of values expected to be in actual.
sequence
,
ComparisonStrategy
the ComparisonStrategy used to evaluate assertion.
comparisonStrategy
)

Creates a new ShouldContainCharSequence.

public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldContainIgnoringWhitespaces
(CharSequence
the actual value in the failed assertion.
actual
,
CharSequence[]
the sequence of values expected to be in actual.
strings
,
Set<? extends CharSequence>
the values not found.
notFound
,
ComparisonStrategy
the ComparisonStrategy used to evaluate assertion.
comparisonStrategy
)

Creates a new ShouldContainCharSequence.

Inherited from org.assertj.core.error.BasicErrorMessageFactory:
createcreatecreateequalshashCodetoStringunquotedString

Constructor Detail

ShouldContainCharSequenceback to summary
private ShouldContainCharSequence(String format, CharSequence actual, CharSequence sequence, ComparisonStrategy comparisonStrategy)
ShouldContainCharSequenceback to summary
private ShouldContainCharSequence(String format, CharSequence actual, CharSequence[] values, Set<? extends CharSequence> notFound, ComparisonStrategy comparisonStrategy)

Method Detail

containsIgnoringNewLinesback to summary
public static ErrorMessageFactory containsIgnoringNewLines(final CharSequence actual, final CharSequence[] expectedValues, final Set<? extends CharSequence> notFound, final ComparisonStrategy comparisonWay)

Creates a new ShouldContainCharSequence.

Parameters
actual:CharSequence

the actual value in the failed assertion.

expectedValues:CharSequence[]

the sequence of values expected to be in actual.

notFound:Set<? extends CharSequence>

the values not found.

comparisonWay:ComparisonStrategy

the ComparisonStrategy to evaluate assertion.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

shouldContainback to summary
public static ErrorMessageFactory shouldContain(CharSequence actual, CharSequence sequence)

Creates a new ShouldContainCharSequence.

Parameters
actual:CharSequence

the actual value in the failed assertion.

sequence:CharSequence

the sequence of values expected to be in actual.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

shouldContainback to summary
public static ErrorMessageFactory shouldContain(Throwable actual, CharSequence sequence)
shouldContainback to summary
public static ErrorMessageFactory shouldContain(Throwable actual, CharSequence[] sequence, Set<? extends CharSequence> notFound)
shouldContainback to summary
public static ErrorMessageFactory shouldContain(CharSequence actual, CharSequence sequence, ComparisonStrategy comparisonStrategy)

Creates a new ShouldContainCharSequence.

Parameters
actual:CharSequence

the actual value in the failed assertion.

sequence:CharSequence

the sequence of values expected to be in actual.

comparisonStrategy:ComparisonStrategy

the ComparisonStrategy used to evaluate assertion.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

shouldContainback to summary
public static ErrorMessageFactory shouldContain(CharSequence actual, CharSequence[] strings, Set<? extends CharSequence> notFound, ComparisonStrategy comparisonStrategy)

Creates a new ShouldContainCharSequence.

Parameters
actual:CharSequence

the actual value in the failed assertion.

strings:CharSequence[]

the sequence of values expected to be in actual.

notFound:Set<? extends CharSequence>

the values not found.

comparisonStrategy:ComparisonStrategy

the ComparisonStrategy used to evaluate assertion.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

shouldContainback to summary
public static ErrorMessageFactory shouldContain(CharSequence actual, CharSequence[] strings, Set<? extends CharSequence> notFound)

Creates a new ShouldContainCharSequence.

Parameters
actual:CharSequence

the actual value in the failed assertion.

strings:CharSequence[]

the sequence of values expected to be in actual.

notFound:Set<? extends CharSequence>

the values not found.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

shouldContainIgnoringCaseback to summary
public static ErrorMessageFactory shouldContainIgnoringCase(CharSequence actual, CharSequence sequence)

Creates a new ShouldContainCharSequence.

Parameters
actual:CharSequence

the actual value in the failed assertion.

sequence:CharSequence

the sequence of values expected to be in actual.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

shouldContainIgnoringWhitespacesback to summary
public static ErrorMessageFactory shouldContainIgnoringWhitespaces(CharSequence actual, CharSequence sequence, ComparisonStrategy comparisonStrategy)

Creates a new ShouldContainCharSequence.

Parameters
actual:CharSequence

the actual value in the failed assertion.

sequence:CharSequence

the sequence of values expected to be in actual.

comparisonStrategy:ComparisonStrategy

the ComparisonStrategy used to evaluate assertion.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

shouldContainIgnoringWhitespacesback to summary
public static ErrorMessageFactory shouldContainIgnoringWhitespaces(CharSequence actual, CharSequence[] strings, Set<? extends CharSequence> notFound, ComparisonStrategy comparisonStrategy)

Creates a new ShouldContainCharSequence.

Parameters
actual:CharSequence

the actual value in the failed assertion.

strings:CharSequence[]

the sequence of values expected to be in actual.

notFound:Set<? extends CharSequence>

the values not found.

comparisonStrategy:ComparisonStrategy

the ComparisonStrategy used to evaluate assertion.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.