Class StringSubject.CaseInsensitiveStringComparison

java.lang.Object
com.google.common.truth.StringSubject.CaseInsensitiveStringComparison
Enclosing class:
StringSubject

public final class StringSubject.CaseInsensitiveStringComparison extends Object
Case insensitive propositions for string subjects.
  • Constructor Details

    • CaseInsensitiveStringComparison

      private CaseInsensitiveStringComparison()
  • Method Details

    • isEqualTo

      public void isEqualTo(String expected)
      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:

      Example: "abc" is equal to "ABC", but not to "abcd".

    • isNotEqualTo

      public void isNotEqualTo(String unexpected)
      Fails if the subject is equal to the given string (while ignoring case). The meaning of equality is the same as for the isEqualTo(java.lang.String) method.
    • contains

      public void contains(CharSequence expectedSequence)
      Fails if the string does not contain the given sequence (while ignoring case).
    • doesNotContain

      public void doesNotContain(CharSequence expectedSequence)
      Fails if the string contains the given sequence (while ignoring case).
    • containsIgnoreCase

      private boolean containsIgnoreCase(String string)