Package org.assertj.core.api
Class AbstractMatcherAssert<SELF extends AbstractMatcherAssert<SELF>>
- java.lang.Object
-
- org.assertj.core.api.AbstractAssert<SELF,java.util.regex.Matcher>
-
- org.assertj.core.api.AbstractMatcherAssert<SELF>
-
- All Implemented Interfaces:
Assert<SELF,java.util.regex.Matcher>
,Descriptable<SELF>
,ExtensionPoints<SELF,java.util.regex.Matcher>
- Direct Known Subclasses:
MatcherAssert
public abstract class AbstractMatcherAssert<SELF extends AbstractMatcherAssert<SELF>> extends AbstractAssert<SELF,java.util.regex.Matcher>
Assertions forMatcher
-
-
Field Summary
-
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, assertionErrorCreator, conditions, customRepresentation, info, myself, objects, printAssertionsDescription, throwUnsupportedExceptionOnEquals
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractMatcherAssert(java.util.regex.Matcher actual, java.lang.Class<?> selfType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SELF
matches()
Verifies that the Matcher matches.-
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, withAssertionState, 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
-
-
-
-
Method Detail
-
matches
public SELF 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:
java.lang.AssertionError
- if actual does not match.java.lang.AssertionError
- if actual is null.- Since:
- 3.23.0
-
-