Package org.fest.assertions.error
Class ShouldContainStringOnlyOnce
- java.lang.Object
-
- org.fest.assertions.error.BasicErrorMessageFactory
-
- org.fest.assertions.error.ShouldContainStringOnlyOnce
-
- All Implemented Interfaces:
ErrorMessageFactory
public class ShouldContainStringOnlyOnce extends BasicErrorMessageFactory
Creates an error message indicating that an assertion that verifies that aString
contains anotherString
only once failed.- Author:
- Pauline Iogna, Joel Costigliola
-
-
Field Summary
-
Fields inherited from class org.fest.assertions.error.BasicErrorMessageFactory
arguments, format
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ErrorMessageFactory
shouldContainOnlyOnce(java.lang.String actual, java.lang.String sequence, int occurences)
Creates a new
.ShouldContainStringOnlyOnce
static ErrorMessageFactory
shouldContainOnlyOnce(java.lang.String actual, java.lang.String sequence, int occurences, ComparisonStrategy comparisonStrategy)
Creates a new
.ShouldContainStringOnlyOnce
-
Methods inherited from class org.fest.assertions.error.BasicErrorMessageFactory
create, equals, hashCode, toString
-
-
-
-
Method Detail
-
shouldContainOnlyOnce
public static ErrorMessageFactory shouldContainOnlyOnce(java.lang.String actual, java.lang.String sequence, int occurences, ComparisonStrategy comparisonStrategy)
Creates a new
.ShouldContainStringOnlyOnce
- Parameters:
actual
- the actual value in the failed assertion.sequence
- the String expected to be inactual
only once.occurences
- the number of occurences of sequence in actual.comparisonStrategy
- theComparisonStrategy
used to evaluate assertion.- Returns:
- the created
ErrorMessageFactory
.
-
shouldContainOnlyOnce
public static ErrorMessageFactory shouldContainOnlyOnce(java.lang.String actual, java.lang.String sequence, int occurences)
Creates a new
.ShouldContainStringOnlyOnce
- Parameters:
actual
- the actual value in the failed assertion.sequence
- the String expected to be inactual
only once.occurences
- the number of occurences of sequence in actual.- Returns:
- the created
ErrorMessageFactory
.
-
-