ArgMatcher

fun interface ArgMatcher<in T>(source)

Checks if given argument satisfies provided conditions.

A matcher that combines other matchers should implement ArgMatcher.Composite.

Inheritors

Types

Link copied to clipboard
data object Any : ArgMatcher<Any?> , Renderable

Matches any argument.

Link copied to clipboard
class Comparing<T : Comparable<T>>(val value: T, val type: ArgMatcher.Comparing.Type) : ArgMatcher<T> , Renderable

Matches any Comparable depending on type parameter.

Link copied to clipboard

A matcher that combines other matchers (e.g. dev.mokkery.matcher.logical.LogicalMatchers.Or).

Link copied to clipboard
class Equals<T>(val value: T) : ArgMatcher<T> , Renderable

Matches an argument that is equal to value.

Link copied to clipboard
class EqualsRef<T>(val value: T) : ArgMatcher<T> , Renderable

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

Link copied to clipboard
class OfType<T>(val type: KClass<*>) : ArgMatcher<T> , Renderable

Matches an argument that is instance of type.

Functions

Link copied to clipboard
abstract fun matches(arg: T): Boolean
Link copied to clipboard

Helper function to propagate capture for dev.mokkery.matcher.ArgMatcher.Composite.