Types

Link copied to clipboard
object Any : ArgMatcher<Any?>

Matches any argument.

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

Matches any Comparable depending on type parameter.

Link copied to clipboard

Arg matcher that must be composed with other matchers. Every composite matcher has to implement Capture to propagate it to its children. Use dev.mokkery.matcher.capture.propagateCapture for convenience.

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

Matches an argument that is equal to value.

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

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

Link copied to clipboard
class Matching<T>(val predicate: (T) -> Boolean, val toStringFun: () -> String) : ArgMatcher<T>

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

Link copied to clipboard
class NotEqual<T>(val value: T) : ArgMatcher<T>

Matches an argument that is not equal to value.

Link copied to clipboard
class NotEqualRef<T>(val value: T) : ArgMatcher<T>

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

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

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.