AnyOf

class AnyOf<T>(matchers: Iterable<Matcher<in T>>) : ShortcutCombination<T>

Calculates the logical disjunction of multiple matchers. Evaluation is shortcut, so subsequent matchers are not called if an earlier matcher returns true.

Constructors

Link copied to clipboard
constructor(matchers: Iterable<Matcher<in T>>)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun describeMismatch(item: Any, description: Description)

Generate a description of why the matcher has not accepted the item. The description will be part of a larger description of why a matching failed, so it should be concise. This method assumes that matches(item) is false, but will not check this.

Link copied to clipboard
open override fun describeTo(description: Description)

Generates a description of the object. The description may be part of a a description of a larger object of which this is just a component, so it should be worded appropriately.

fun describeTo(description: Description, operator: String)
Link copied to clipboard
open override fun matches(o: Any): Boolean

Evaluates the matcher for argument item.

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