GlanceNodeAssertionsProvider
interface GlanceNodeAssertionsProvider<R : Any?, T : GlanceNode<R>>
GlanceAppWidgetUnitTest |
Provides methods to enable you to test your logic of building Glance composable content in the |
Provides an entry point into testing exposing methods to find glance nodes
Summary
Public functions |
|
|---|---|
GlanceNodeAssertionCollection<R, T> |
onAllNodes(matcher: GlanceNodeMatcher<R>)Finds all Glance nodes that matches the given condition. |
GlanceNodeAssertion<R, T> |
onNode(matcher: GlanceNodeMatcher<R>)Finds a Glance node that matches the given condition. |
Public functions
onAllNodes
fun onAllNodes(matcher: GlanceNodeMatcher<R>): GlanceNodeAssertionCollection<R, T>
Finds all Glance nodes that matches the given condition.
| Parameters | |
|---|---|
matcher: GlanceNodeMatcher<R> |
Matcher used for filtering |
onNode
fun onNode(matcher: GlanceNodeMatcher<R>): GlanceNodeAssertion<R, T>
Finds a Glance node that matches the given condition.
Any subsequent operation on its result will expect exactly one element found and will throw AssertionError if none or more than one element is found.
| Parameters | |
|---|---|
matcher: GlanceNodeMatcher<R> |
Matcher used for filtering |