And

class And<T>(val expectedMatchers: Int, val matchers: List<ArgMatcher<T>> = emptyList()) : ArgMatcher.Composite<T>

Matches argument that satisfies all the matchers. It must be merged with expectedMatchers number of ArgMatchers.

Constructors

Link copied to clipboard
constructor(expectedMatchers: Int, matchers: List<ArgMatcher<T>> = emptyList())

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun assertFilled()

Checks if is it is properly filled and throws exception if it is not. It is called when composite is considered "final". It is often used to verify missing matchers.

Link copied to clipboard
open override fun capture(value: T)

Propagates value to children matchers.

Link copied to clipboard
open override fun compose(matcher: ArgMatcher<T>): ArgMatcher.Composite<T>

Returns new Composite with matcher merged. This method gets matchers in reversed order.

Link copied to clipboard
open override fun isFilled(): Boolean

Returns true if it is merged with all required matchers and must not be merged anymore.

Link copied to clipboard
open override fun matches(arg: 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