Module org.testfx
Package org.testfx.assertions.api
Class AbstractNodeAssert<SELF extends AbstractNodeAssert<SELF>>
- java.lang.Object
-
- org.assertj.core.api.AbstractAssert<SELF,javafx.css.Styleable>
-
- org.testfx.assertions.api.AbstractStyleableAssert<SELF>
-
- org.testfx.assertions.api.AbstractNodeAssert<SELF>
-
- All Implemented Interfaces:
org.assertj.core.api.Assert<SELF,javafx.css.Styleable>
,org.assertj.core.api.Descriptable<SELF>
,org.assertj.core.api.ExtensionPoints<SELF,javafx.css.Styleable>
- Direct Known Subclasses:
AbstractComboBoxAssert
,AbstractListViewAssert
,AbstractParentAssert
,AbstractTableViewAssert
,AbstractTextAssert
,NodeAssert
public class AbstractNodeAssert<SELF extends AbstractNodeAssert<SELF>> extends AbstractStyleableAssert<SELF>
Base class for allNode
assertions.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractNodeAssert(javafx.scene.Node actual, Class<?> selfType)
-
Method Summary
Modifier and Type Method Description SELF
doesNotHaveChild(String query)
Verifies that the actualNode
does not have a specific childNode
.SELF
hasChild(String query)
Verifies that the actualNode
has a specific childNode
.SELF
hasExactlyChildren(int amount, String query)
Verifies that the actualNode
has exactly the givenamount
of children that are looked up by the givenquery
, which is passed to is passed toNodeQuery.lookup(String)
.SELF
isDisabled()
Verifies that the actualNode
is disabled.SELF
isEnabled()
Verifies that the actualNode
is enabled.SELF
isFocused()
Verifies that the actualNode
has focus.SELF
isInvisible()
Verifies that the actualNode
is not visible.SELF
isNotFocused()
Verifies that the actualNode
does not have focus.SELF
isVisible()
Verifies that the actualNode
is visible.-
Methods inherited from class org.testfx.assertions.api.AbstractStyleableAssert
doesNotHaveId, doesNotHaveStyle, doesNotHaveStyleableParent, doesNotHaveTypeSelector, hasId, hasStyle, hasStyleableParent, hasTypeSelector
-
Methods inherited from class org.assertj.core.api.AbstractAssert
as, as, asInstanceOf, asList, asString, describedAs, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, equals, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, inBinary, inHexadecimal, is, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, setCustomRepresentation, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, withFailMessage, withRepresentation, withThreadDumpOnError
-
-
-
-
Constructor Detail
-
AbstractNodeAssert
protected AbstractNodeAssert(javafx.scene.Node actual, Class<?> selfType)
-
-
Method Detail
-
isVisible
public SELF isVisible()
Verifies that the actualNode
is visible.- Returns:
- this assertion object
-
isInvisible
public SELF isInvisible()
Verifies that the actualNode
is not visible.- Returns:
- this assertion object
-
isEnabled
public SELF isEnabled()
Verifies that the actualNode
is enabled.- Returns:
- this assertion object
-
isDisabled
public SELF isDisabled()
Verifies that the actualNode
is disabled.- Returns:
- this assertion object
-
isFocused
public SELF isFocused()
Verifies that the actualNode
has focus.- Returns:
- this assertion object
-
isNotFocused
public SELF isNotFocused()
Verifies that the actualNode
does not have focus.- Returns:
- this assertion object
-
hasChild
public SELF hasChild(String query)
Verifies that the actualNode
has a specific childNode
. The childNode
to look for is specified by the givenquery
, which is passed toNodeQuery.lookup(String)
.- Parameters:
query
- the node query that specifies the child to look for in the actualNode
- Returns:
- this assertion object
-
doesNotHaveChild
public SELF doesNotHaveChild(String query)
Verifies that the actualNode
does not have a specific childNode
. The childNode
to look for is specified by the givenquery
, which is passed toNodeQuery.lookup(String)
.- Parameters:
query
- the node query that specifies the child to look for in the actualNode
- Returns:
- this assertion object
-
hasExactlyChildren
public SELF hasExactlyChildren(int amount, String query)
Verifies that the actualNode
has exactly the givenamount
of children that are looked up by the givenquery
, which is passed to is passed toNodeQuery.lookup(String)
.- Parameters:
amount
- the given amount of children the actualNode
must exactly havequery
- the node query that specifies the children to look for in the actualNode
- Returns:
- this assertion object
-
-