Package com.google.common.truth
Class StringSubject.CaseInsensitiveStringComparison
java.lang.Object
com.google.common.truth.StringSubject.CaseInsensitiveStringComparison
- Enclosing class:
StringSubject
Case insensitive propositions for string subjects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
contains
(CharSequence expectedSequence) Fails if the string does not contain the given sequence (while ignoring case).private boolean
containsIgnoreCase
(String string) void
doesNotContain
(CharSequence expectedSequence) Fails if the string contains the given sequence (while ignoring case).void
Fails if the subject is not equal to the given sequence (while ignoring case).void
isNotEqualTo
(String unexpected) Fails if the subject is equal to the given string (while ignoring case).
-
Constructor Details
-
CaseInsensitiveStringComparison
private CaseInsensitiveStringComparison()
-
-
Method Details
-
isEqualTo
Fails if the subject is not equal to the given sequence (while ignoring case). For the purposes of this comparison, two strings are equal if any of the following is true:- they are equal according to
String.equalsIgnoreCase(java.lang.String)
- they are both null
Example: "abc" is equal to "ABC", but not to "abcd".
- they are equal according to
-
isNotEqualTo
Fails if the subject is equal to the given string (while ignoring case). The meaning of equality is the same as for theisEqualTo(java.lang.String)
method. -
contains
Fails if the string does not contain the given sequence (while ignoring case). -
doesNotContain
Fails if the string contains the given sequence (while ignoring case). -
containsIgnoreCase
-