Package-level declarations

Types

Link copied to clipboard
fun interface ArgMatcher<in T>

Checks if given argument satisfies provided conditions.

Link copied to clipboard

Scope for declaring argument matchers.

Functions

Link copied to clipboard

Matches any argument.

Link copied to clipboard
fun <T : Comparable<T>> MokkeryMatcherScope.gt(value: T): T

Matches argument that is greater than value.

Link copied to clipboard
fun <T : Comparable<T>> MokkeryMatcherScope.gte(value: T): T

Matches an argument that is greater than or equal to value.

Link copied to clipboard
fun <T : Comparable<T>> MokkeryMatcherScope.lt(value: T): T

Matches argument that is less than value.

Link copied to clipboard
fun <T : Comparable<T>> MokkeryMatcherScope.lte(value: T): T

Matches an argument that is less than or equal to value.

Link copied to clipboard

Matches argument that satisfies a matcher. Cannot be used with ArgMatcher.Composite. Use matchesComposite instead.

fun <T> MokkeryMatcherScope.matches(toString: () -> String, predicate: (T) -> Boolean): T

Matches an argument according to the predicate. Registered matcher Any.toString calls toString.

Link copied to clipboard
fun <T> MokkeryMatcherScope.matchesBy(function: (T) -> Boolean): T

Matches an argument by calling given function. Also, it returns function name on Any.toString.

Link copied to clipboard

Matches an argument that satisfies a matcher composed of matchers with builder.

Link copied to clipboard
inline fun <T> MokkeryMatcherScope.ofType(): T

Matches an argument that is an instance of type T.

Link copied to clipboard
fun <T> MokkeryMatcherScope.ref(value: T): T

Matches an argument whose reference is equal to value's reference.