org.assertj.core.error
Class ShouldContainCharSequence

java.lang.Object
  extended by org.assertj.core.error.BasicErrorMessageFactory
      extended by org.assertj.core.error.ShouldContainCharSequence
All Implemented Interfaces:
ErrorMessageFactory

public class ShouldContainCharSequence
extends BasicErrorMessageFactory

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
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, ComparisonStrategy comparisonStrategy)
          Creates a new ShouldContainCharSequence.
static ErrorMessageFactory shouldContain(CharSequence actual, CharSequence sequence, ComparisonStrategy comparisonStrategy)
          Creates a new ShouldContainCharSequence.
static ErrorMessageFactory shouldContainIgnoringCase(CharSequence actual, CharSequence sequence)
          Creates a new ShouldContainCharSequence.
 
Methods inherited from class org.assertj.core.error.BasicErrorMessageFactory
create, create, equals, hashCode, toString, unquotedString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

shouldContain

public static ErrorMessageFactory shouldContain(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 in actual.
Returns:
the created ErrorMessageFactory.

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 in actual.
comparisonStrategy - the ComparisonStrategy used 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 in actual.
comparisonStrategy - the ComparisonStrategy 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 in actual.
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 in actual.
Returns:
the created ErrorMessageFactory.


Copyright © 2013–2015 AssertJ. All rights reserved.