public Matcher<T>
A interface Matcher is the main abstraction in the assertions library.
Implementations contain a single function, called 'test', which
accepts a value of type T and returns an instance of class Result.
This class Result return value contains the state of the assertion
after it has been evaluted.
A matcher will typically be invoked when used with the should
functions in the assertions DSL. For example, 2 should beLessThan(4)
interface Matcher,
class Result,
class Result| Modifier and Type | Interface and Description |
|---|---|
static class |
Matcher.DefaultImpls
A
interface Matcher is the main abstraction in the assertions library. |
| Modifier and Type | Method and Description |
|---|---|
Matcher<T> |
and(Matcher<T> other) |
<U> Matcher<U> |
compose(kotlin.jvm.functions.Function1<? super U,? extends T> fn) |
<U> Matcher<U> |
contramap(kotlin.jvm.functions.Function1<? super U,? extends T> f) |
Matcher<T> |
invert() |
Matcher<T> |
or(Matcher<T> other) |
Result |
test(T value) |