Package org.testfx.matcher.base
Class NodeMatchers
java.lang.Object
org.testfx.matcher.base.NodeMatchers
TestFX matchers for
Node
instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.hamcrest.Matcher
<javafx.scene.Node> anything()
Creates a matcher that matches everything (matches(Object)
always returns true.static org.hamcrest.Matcher
<javafx.scene.Node> Creates a matcher that matches allNode
s that have at least one child node that is found viaNodeQuery.lookup(String)
.private static boolean
static org.hamcrest.Matcher
<javafx.scene.Node> hasChildren
(int amount, String query) Creates a matcher that matches allNode
s that have exactlyamount
child nodes that are found viaNodeQuery.lookup(String)
.private static boolean
hasChildren
(javafx.scene.Node node, int amount, String query) static org.hamcrest.Matcher
<javafx.scene.Node> Creates a matcher that matches all disabledNode
s (i.e.static org.hamcrest.Matcher
<javafx.scene.Node> Creates a matcher that matches all enabledNode
s (i.e.static org.hamcrest.Matcher
<javafx.scene.Node> Creates a matcher that matches all focusedNode
s (i.e.static org.hamcrest.Matcher
<javafx.scene.Node> Creates a matcher that matches all invisibleNode
s.static org.hamcrest.Matcher
<javafx.scene.Node> Creates a matcher that matches all focusedNode
s (i.e.static org.hamcrest.Matcher
<javafx.scene.Node> Creates a matcher that matches all non-nullNode
s.static org.hamcrest.Matcher
<javafx.scene.Node> isNull()
Creates a matcher that matches all nullNode
s.static org.hamcrest.Matcher
<javafx.scene.Node> Creates a matcher that matches all visibleNode
s.
-
Constructor Details
-
NodeMatchers
private NodeMatchers()
-
-
Method Details
-
anything
public static org.hamcrest.Matcher<javafx.scene.Node> anything()Creates a matcher that matches everything (matches(Object)
always returns true. -
isNull
public static org.hamcrest.Matcher<javafx.scene.Node> isNull()Creates a matcher that matches all nullNode
s. -
isNotNull
public static org.hamcrest.Matcher<javafx.scene.Node> isNotNull()Creates a matcher that matches all non-nullNode
s. -
isVisible
public static org.hamcrest.Matcher<javafx.scene.Node> isVisible()Creates a matcher that matches all visibleNode
s. -
isInvisible
public static org.hamcrest.Matcher<javafx.scene.Node> isInvisible()Creates a matcher that matches all invisibleNode
s. -
isEnabled
public static org.hamcrest.Matcher<javafx.scene.Node> isEnabled()Creates a matcher that matches all enabledNode
s (i.e.Node.isDisabled()
returns false). -
isDisabled
public static org.hamcrest.Matcher<javafx.scene.Node> isDisabled()Creates a matcher that matches all disabledNode
s (i.e.Node.isDisabled()
returns true). -
isFocused
public static org.hamcrest.Matcher<javafx.scene.Node> isFocused()Creates a matcher that matches all focusedNode
s (i.e.Node.isFocused()
returns true). -
isNotFocused
public static org.hamcrest.Matcher<javafx.scene.Node> isNotFocused()Creates a matcher that matches all focusedNode
s (i.e.Node.isFocused()
returns false). -
hasChild
Creates a matcher that matches allNode
s that have at least one child node that is found viaNodeQuery.lookup(String)
. -
hasChildren
Creates a matcher that matches allNode
s that have exactlyamount
child nodes that are found viaNodeQuery.lookup(String)
. -
hasChild
-
hasChildren
-