public class FunctionalWrappingMatcher<T,M> extends TypeSafeWrappingMatcher<T,M>
FunctionalWrappingMatcher class.
| Modifier | Constructor and Description |
|---|---|
protected |
FunctionalWrappingMatcher(Function<T,M> mapping,
org.hamcrest.Matcher<M> matcher) |
| Modifier and Type | Method and Description |
|---|---|
void |
describeTo(org.hamcrest.Description description) |
Function<T,M> |
getMappingFunction()
Getter for the field
mappingFunction. |
protected M |
map(T item) |
void |
setMappingFunction(Function<T,M> mappingFunction)
Setter for the field
mappingFunction. |
static <T,M> org.hamcrest.Matcher<T> |
whenMapping(Function<T,M> mapping,
org.hamcrest.Matcher<M> matcher)
Maps input to type needed and then matches.
|
describeMismatchSafely, getInternalMatcher, matchesSafely, setInternalMatcherpublic void describeTo(org.hamcrest.Description description)
describeTo in interface org.hamcrest.SelfDescribingdescribeTo in class TypeSafeWrappingMatcher<T,M>public Function<T,M> getMappingFunction()
Getter for the field mappingFunction.
Function object.public void setMappingFunction(Function<T,M> mappingFunction)
Setter for the field mappingFunction.
mappingFunction - a Function object.public static <T,M> org.hamcrest.Matcher<T> whenMapping(Function<T,M> mapping, org.hamcrest.Matcher<M> matcher)
T - input typeM - type needed by matchermapping - used to map input to matcher typematcher - used to do actual matchingCopyright © 2017–2022 wcm.io QA. All rights reserved.