Package org.assertj.core.api
Class AbstractMatcherAssert<SELF extends AbstractMatcherAssert<SELF>>
java.lang.Object
org.assertj.core.api.AbstractAssert<SELF,Matcher>
org.assertj.core.api.AbstractMatcherAssert<SELF>
- All Implemented Interfaces:
Assert<SELF,
,Matcher> Descriptable<SELF>
,ExtensionPoints<SELF,
Matcher>
- Direct Known Subclasses:
MatcherAssert
public abstract class AbstractMatcherAssert<SELF extends AbstractMatcherAssert<SELF>>
extends AbstractAssert<SELF,Matcher>
Assertions for
Matcher
- Author:
- Jiashu Zhang
-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals
-
Constructor Summary
-
Method Summary
Methods inherited from class org.assertj.core.api.AbstractAssert
areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, hasToString, inBinary, inHexadecimal, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.assertj.core.api.Descriptable
as, as, as, describedAs, describedAs
-
Constructor Details
-
AbstractMatcherAssert
-
-
Method Details
-
matches
Verifies that the Matcher matches.Example:
// Assertion succeeds: Pattern pattern = Pattern.compile("a*"); Matcher matcher = pattern.matcher("aaa"); assertThat(matcher).matches(); // Assertion fails: Pattern pattern = Pattern.compile("a*"); Matcher matcher = pattern.matcher("abc"); assertThat(matcher).matches();
- Returns:
- this assertion object.
- Throws:
AssertionError
- if actual does not match.AssertionError
- if actual is null.- Since:
- 3.23.0
-