org.assertj.core.error
Class ShouldContainCharSequenceOnlyOnce
java.lang.Object
org.assertj.core.error.BasicErrorMessageFactory
org.assertj.core.error.ShouldContainCharSequenceOnlyOnce
- All Implemented Interfaces:
- ErrorMessageFactory
public class ShouldContainCharSequenceOnlyOnce
- extends BasicErrorMessageFactory
Creates an error message indicating that an assertion that verifies that a CharSequence contains another CharSequence only
once failed.
- Author:
- Pauline Iogna, Joel Costigliola, Mikhail Mazursky
shouldContainOnlyOnce
public static ErrorMessageFactory shouldContainOnlyOnce(CharSequence actual,
CharSequence sequence,
int occurences,
ComparisonStrategy comparisonStrategy)
- Creates a new
ShouldContainCharSequenceOnlyOnce.
- Parameters:
actual - the actual value in the failed assertion.sequence - the String expected to be in actual only once.occurences - the number of occurrences of sequence in actual.comparisonStrategy - the ComparisonStrategy used to evaluate assertion.
- Returns:
- the created
ErrorMessageFactory.
shouldContainOnlyOnce
public static ErrorMessageFactory shouldContainOnlyOnce(CharSequence actual,
CharSequence sequence,
int occurences)
- Creates a new
ShouldContainCharSequenceOnlyOnce.
- Parameters:
actual - the actual value in the failed assertion.sequence - the String expected to be in actual only once.occurences - the number of occurrences of sequence in actual.
- Returns:
- the created
ErrorMessageFactory.
Copyright © 2013–2015 AssertJ. All rights reserved.