public abstract class ClassCompositeMatcher<T> extends BaseCompositeMatcher<T>
Modifier | Constructor and Description |
---|---|
protected |
ClassCompositeMatcher(Class<? extends T> expectedType,
T expected)
Creates a new ClassCompositeMatcher instance.
|
Modifier and Type | Method and Description |
---|---|
protected Class<? extends T> |
getExpectedType()
Returns the expected type for this matcher.
|
protected Matcher<? super T> |
getTypeMismatch(Object object)
If the given object is incompatible with the expected type, returns a Matcher that describes the mismatch.
|
protected void |
setExpectedType(Class<? extends T> expectedType)
Changes the expected type for this matcher.
|
String |
toString() |
containsElementsMatching, containsEntriesMatching, containsEntriesMatching, containsMembersMatching, describeMismatch, describeTo, expectThat, expectThat, listsElementsMatching, listsMatching, listsMembersMatching, matches, matches, valueOf, visitsListMatching, visitsMembersMatching
_dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull
protected void setExpectedType(Class<? extends T> expectedType)
protected Class<? extends T> getExpectedType()
protected Matcher<? super T> getTypeMismatch(Object object)
getTypeMismatch
in class BaseCompositeMatcher<T>
public String toString()
toString
in class BaseCompositeMatcher<T>
Copyright © 2022 The Cornutum Project. All rights reserved.