Package limn.testing
Class AccessibleTrees
java.lang.Object
limn.testing.AccessibleTrees
Reading a published tree in a test: one node by name, every node in a state, and the whole
tree as text for the message of an assertion that failed. The two accessibility test bases
each had these three; the tests under them each had a fourth for a node by identifier.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringdescribe(AccessibleTree tree) The tree as one line per node, for the message of a failed assertion: index, role, name, states, box and parent.static @Nullable AccessibleNodenamed(AccessibleTree tree, String name) static @Nullable AccessibleNodewithRole(AccessibleTree tree, Accessible.Role role) static List<AccessibleNode> withState(AccessibleTree tree, Accessible.State state)
-
Method Details
-
named
- Parameters:
tree- the treename- a node's name, exactly- Returns:
- the first node with that name, or
null
-
withRole
- Parameters:
tree- the treerole- a role- Returns:
- the first node with that role, or
null
-
withState
- Parameters:
tree- the treestate- a state- Returns:
- every node carrying it, in tree order
-
describe
The tree as one line per node, for the message of a failed assertion: index, role, name, states, box and parent.- Parameters:
tree- the tree- Returns:
- the text, beginning with a newline so it reads under the assertion's own message
-