class LayoutElementMatcher


Wrapper for element matcher lambdas that allows to build string explaining to the developer what conditions are being tested.

Summary

Public constructors

LayoutElementMatcher(
    description: String,
    matcher: (LayoutElementBuilders.LayoutElement) -> Boolean
)

Constructor for the Wrapper of element matcher lambdas that allows to build string explaining to the developer what conditions are being tested.

Public functions

infix LayoutElementMatcher

Returns whether the given element is matched by both this and the other mather.

operator LayoutElementMatcher
not()

Returns whether the given element does not match the matcher.

infix LayoutElementMatcher

Returns whether the given element is matched by this or the other mather.

Public constructors

LayoutElementMatcher

Added in 1.3.0-alpha09
LayoutElementMatcher(
    description: String,
    matcher: (LayoutElementBuilders.LayoutElement) -> Boolean
)

Constructor for the Wrapper of element matcher lambdas that allows to build string explaining to the developer what conditions are being tested.

Parameters
description: String

a string explaining to the developer what conditions were being tested.

matcher: (LayoutElementBuilders.LayoutElement) -> Boolean

a lambda performing the actual logic of matching on the layout element.

LayoutElementMatcher

Added in 1.3.0-alpha09
LayoutElementMatcher(
    description: String,
    matcher: (LayoutElementBuilders.LayoutElement, TestContext) -> Boolean
)
Parameters
description: String

a string explaining to the developer what conditions were being tested.

matcher: (LayoutElementBuilders.LayoutElement, TestContext) -> Boolean

a lambda performing the actual logic of matching on the layout element, with a TextContext accessible for retrieving context data such as the dynamic data map for evaluating the dynamic values.

Public functions

and

Added in 1.3.0-alpha09
infix fun and(other: LayoutElementMatcher): LayoutElementMatcher

Returns whether the given element is matched by both this and the other mather.

Parameters
other: LayoutElementMatcher

mather that should also match in addition to current matcher.

not

Added in 1.3.0-alpha09
operator fun not(): LayoutElementMatcher

Returns whether the given element does not match the matcher.

or

Added in 1.3.0-alpha09
infix fun or(other: LayoutElementMatcher): LayoutElementMatcher

Returns whether the given element is matched by this or the other mather.

Parameters
other: LayoutElementMatcher

mather that can be tested to match if the current matcher does not.