|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fest.assertions.Assert
org.fest.assertions.GenericAssert<S,A>
org.fest.assertions.GroupAssert<StringAssert,String>
org.fest.assertions.StringAssert
public class StringAssert
Assertions for Strings.
To create a new instance of this class invoke .
Assertions.assertThat(String)
| Field Summary |
|---|
| Fields inherited from class org.fest.assertions.GenericAssert |
|---|
actual, myself |
| Constructor Summary | |
|---|---|
protected |
StringAssert(String actual)
Creates a new StringAssert. |
| Method Summary | |
|---|---|
protected int |
actualGroupSize()
Returns the number of elements in the actual String. |
StringAssert |
contains(String expected)
Verifies that the actual String contains the given one. |
StringAssert |
containsIgnoringCase(String text)
Verifies that the actual String contains the given text regardless of the case. |
StringAssert |
doesNotContain(String text)
Verifies that the actual String does not contain the given text. |
StringAssert |
doesNotMatch(String regex)
Verifies that the actual String does not match the given one. |
StringAssert |
endsWith(String expected)
Verifies that the actual String ends with the given one. |
StringAssert |
excludes(String s)
Verifies that the actual String does not contains the given one. |
StringAssert |
isEqualToIgnoringCase(String expected)
Verifies that the actual String is equal to the given one ignoring case. |
StringAssert |
matches(String regex)
Verifies that the actual String matches the given one. |
StringAssert |
startsWith(String expected)
Verifies that the actual String starts with the given one. |
| Methods inherited from class org.fest.assertions.GroupAssert |
|---|
hasSize, isEmpty, isNotEmpty, isNullOrEmpty |
| Methods inherited from class org.fest.assertions.GenericAssert |
|---|
as, as, describedAs, describedAs, doesNotSatisfy, is, isEqualTo, isIn, isIn, isNot, isNotEqualTo, isNotIn, isNotIn, isNotNull, isNotSameAs, isNull, isSameAs, overridingErrorMessage, satisfies |
| Methods inherited from class org.fest.assertions.Assert |
|---|
customErrorMessage, description, description, description, equals, fail, fail, failIfCustomMessageIsSet, failIfCustomMessageIsSet, failure, formattedErrorMessage, hashCode, rawDescription, replaceDefaultErrorMessagesWith |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected StringAssert(String actual)
StringAssert.
actual - the target to verify.| Method Detail |
|---|
public StringAssert isEqualToIgnoringCase(String expected)
String is equal to the given one ignoring case.
expected - the given String to compare the actual String to.
AssertionError - if the actual String is null.
AssertionError - if the actual String is not equal to the given one ignoring case.protected int actualGroupSize()
String.
actualGroupSize in class GroupAssert<StringAssert,String>String.public StringAssert contains(String expected)
String contains the given one.
expected - the given String expected to be contained in the actual one.
AssertionError - if the actual String is null.
AssertionError - if the actual String does not contain the given one.public StringAssert endsWith(String expected)
String ends with the given one.
expected - the given String expected to be at the end of the actual one.
AssertionError - if the actual String is null.
AssertionError - if the actual String does not end with the given one.public StringAssert startsWith(String expected)
String starts with the given one.
expected - the given String expected to be at the beginning of the actual one.
AssertionError - if the actual String is null.
AssertionError - if the actual String does not start with the given one.public StringAssert excludes(String s)
String does not contains the given one.
s - the given String expected not to be contained in the actual one.
AssertionError - if the actual String is null.
AssertionError - if the actual String does contain the given one.public StringAssert matches(String regex)
String matches the given one.
regex - the given regular expression expected to be matched by the actual one.
AssertionError - if the actual String is null.
AssertionError - if the actual String does not match the given regular expression.public StringAssert doesNotMatch(String regex)
String does not match the given one.
regex - the given regular expression expected not to be matched by the actual one.
AssertionError - if the actual String is null.
AssertionError - if the actual String matches the given regular expression.public StringAssert containsIgnoringCase(String text)
String contains the given text regardless of the case.
text - the given text.
AssertionError - if the actual String is null.
AssertionError - if the actual String does not contain the given text.
NullPointerException - if the given String is null.public StringAssert doesNotContain(String text)
String does not contain the given text.
text - the given text.
AssertionError - if the actual String is null.
AssertionError - if the actual String contains the given text.
NullPointerException - if the given String is null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||