SemanticsMatcher
-
Cmn
class SemanticsMatcher
Wrapper for semantics matcher lambdas that allows to build string explaining to the developer what conditions were being tested.
Summary
Public companion functions |
||
|---|---|---|
SemanticsMatcher |
<T : Any?> expectValue(key: SemanticsPropertyKey<T>, expectedValue: T)Builds a predicate that tests whether the value of the given |
Cmn
|
SemanticsMatcher |
<T : Any?> keyIsDefined(key: SemanticsPropertyKey<T>)Builds a predicate that tests whether the given |
Cmn
|
SemanticsMatcher |
<T : Any?> keyNotDefined(key: SemanticsPropertyKey<T>)Builds a predicate that tests whether the given |
Cmn
|
Public constructors |
|
|---|---|
SemanticsMatcher(description: String, matcher: (SemanticsNode) -> Boolean) |
Cmn
|
Public functions |
||
|---|---|---|
infix SemanticsMatcher |
and(other: SemanticsMatcher) |
Cmn
|
Boolean |
matches(node: SemanticsNode)Returns whether the given node is matched by this matcher. |
Cmn
|
Boolean |
matchesAny(nodes: Iterable<SemanticsNode>)Returns whether at least one of the given nodes is matched by this matcher. |
Cmn
|
operator SemanticsMatcher |
not() |
Cmn
|
infix SemanticsMatcher |
or(other: SemanticsMatcher) |
Cmn
|
Public properties |
||
|---|---|---|
String |
Cmn
|
Public companion functions
expectValue
fun <T : Any?> expectValue(key: SemanticsPropertyKey<T>, expectedValue: T): SemanticsMatcher
Builds a predicate that tests whether the value of the given key is equal to expectedValue.
keyIsDefined
fun <T : Any?> keyIsDefined(key: SemanticsPropertyKey<T>): SemanticsMatcher
Builds a predicate that tests whether the given key is defined in semantics.
keyNotDefined
fun <T : Any?> keyNotDefined(key: SemanticsPropertyKey<T>): SemanticsMatcher
Builds a predicate that tests whether the given key is NOT defined in semantics.
Public constructors
Public functions
matches
fun matches(node: SemanticsNode): Boolean
Returns whether the given node is matched by this matcher.
matchesAny
fun matchesAny(nodes: Iterable<SemanticsNode>): Boolean
Returns whether at least one of the given nodes is matched by this matcher.