Class Re2jSubjects.Re2jStringSubject
java.lang.Object
com.google.common.truth.Subject
com.google.common.truth.extensions.re2j.Re2jSubjects.Re2jStringSubject
- Enclosing class:
Re2jSubjects
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.common.truth.Subject
Subject.Factory<SubjectT extends Subject, ActualT>
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
Supplies the direct string representation of the actual value to other methods which may prefix or otherwise position it in an error message.void
containsMatch
(com.google.re2j.Pattern pattern) Fails if the string does not contain a match on the given regex.void
containsMatch
(String regex) Fails if the string does not contain a match on the given regex.void
doesNotContainMatch
(com.google.re2j.Pattern pattern) Fails if the string contains a match on the given regex.void
doesNotContainMatch
(String regex) Fails if the string contains a match on the given regex.void
doesNotMatch
(com.google.re2j.Pattern regex) Fails if the string matches the given regex.void
doesNotMatch
(String regex) Fails if the string matches the given regex.void
matches
(com.google.re2j.Pattern regex) Fails if the string does not match the given regex.void
Fails if the string does not match the given regex.Methods inherited from class com.google.common.truth.Subject
check, equals, failWithActual, failWithActual, failWithoutActual, hashCode, ignoreCheck, isAnyOf, isEqualTo, isIn, isInstanceOf, isNoneOf, isNotEqualTo, isNotIn, isNotInstanceOf, isNotNull, isNotSameInstanceAs, isNull, isSameInstanceAs, toString
-
Method Details
-
actualCustomStringRepresentation
Description copied from class:Subject
Supplies the direct string representation of the actual value to other methods which may prefix or otherwise position it in an error message. This should only be overridden to provide an improved string representation of the value under test, as it would appear in any given error message, and should not be used for additional prefixing.Subjects should override this with care.
By default, this returns
String.ValueOf(getActualValue())
.- Overrides:
actualCustomStringRepresentation
in classSubject
-
matches
Fails if the string does not match the given regex. -
matches
Fails if the string does not match the given regex. -
doesNotMatch
Fails if the string matches the given regex. -
doesNotMatch
Fails if the string matches the given regex. -
containsMatch
@GwtIncompatible("com.google.re2j.Pattern") public void containsMatch(com.google.re2j.Pattern pattern) Fails if the string does not contain a match on the given regex. -
containsMatch
Fails if the string does not contain a match on the given regex. -
doesNotContainMatch
@GwtIncompatible("com.google.re2j.Pattern") public void doesNotContainMatch(com.google.re2j.Pattern pattern) Fails if the string contains a match on the given regex. -
doesNotContainMatch
Fails if the string contains a match on the given regex.
-