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 allNodeassertions.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractNodeAssert(javafx.scene.Node actual, java.lang.Class<?> selfType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SELFdoesNotHaveChild(java.lang.String query)Verifies that the actualNodedoes not have a specific childNode.SELFhasChild(java.lang.String query)Verifies that the actualNodehas a specific childNode.SELFhasExactlyChildren(int amount, java.lang.String query)Verifies that the actualNodehas exactly the givenamountof children that are looked up by the givenquery, which is passed to is passed toNodeQuery.lookup(String).SELFisDisabled()Verifies that the actualNodeis disabled.SELFisEnabled()Verifies that the actualNodeis enabled.SELFisFocused()Verifies that the actualNodehas focus.SELFisInvisible()Verifies that the actualNodeis not visible.SELFisNotFocused()Verifies that the actualNodedoes not have focus.SELFisVisible()Verifies that the actualNodeis 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
actual, areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, doesNotMatch, doesNotMatch, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, hasToString, inBinary, inHexadecimal, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, usingEquals, usingEquals, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError
-
-
-
-
Method Detail
-
isVisible
public SELF isVisible()
Verifies that the actualNodeis visible.- Returns:
- this assertion object
-
isInvisible
public SELF isInvisible()
Verifies that the actualNodeis not visible.- Returns:
- this assertion object
-
isEnabled
public SELF isEnabled()
Verifies that the actualNodeis enabled.- Returns:
- this assertion object
-
isDisabled
public SELF isDisabled()
Verifies that the actualNodeis disabled.- Returns:
- this assertion object
-
isFocused
public SELF isFocused()
Verifies that the actualNodehas focus.- Returns:
- this assertion object
-
isNotFocused
public SELF isNotFocused()
Verifies that the actualNodedoes not have focus.- Returns:
- this assertion object
-
hasChild
public SELF hasChild(java.lang.String query)
Verifies that the actualNodehas a specific childNode. The childNodeto 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(java.lang.String query)
Verifies that the actualNodedoes not have a specific childNode. The childNodeto 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, java.lang.String query)
Verifies that the actualNodehas exactly the givenamountof 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 actualNodemust exactly havequery- the node query that specifies the children to look for in the actualNode- Returns:
- this assertion object
-
-