ContainsAnyArray

class ContainsAnyArray<T : Any>(val elementType: KClass<*>, val predicate: (T) -> Boolean) : ArrayArgMatcher<T> (source)

Matches an array that contains any element matching predicate.

Important: elementType must be a KClass of Any if a generic Array is used. For other arrays, e.g., IntArray, the element type is expected, in this case Int.

Constructors

Link copied to clipboard
constructor(elementType: KClass<*>, predicate: (T) -> Boolean)

Properties

Link copied to clipboard
Link copied to clipboard
val predicate: (T) -> Boolean

Functions

Link copied to clipboard
override fun matches(arg: Any?): Boolean
Link copied to clipboard
open override fun matchesElements(elements: List<T>): Boolean
Link copied to clipboard

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

Link copied to clipboard
open override fun toString(): String