Package org.testfx.assertions.api
Class AbstractComboBoxAssert<SELF extends AbstractComboBoxAssert<SELF,T>,T>
java.lang.Object
org.assertj.core.api.AbstractAssert<SELF,javafx.css.Styleable>
org.testfx.assertions.api.AbstractStyleableAssert<SELF>
org.testfx.assertions.api.AbstractNodeAssert<SELF>
org.testfx.assertions.api.AbstractComboBoxAssert<SELF,T>
- 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:
ComboBoxAssert
public class AbstractComboBoxAssert<SELF extends AbstractComboBoxAssert<SELF,T>,T>
extends AbstractNodeAssert<SELF>
Assertion methods for
ComboBox type.
To create an instance of this class, invoke .
Assertions.assertThat(ComboBox)
Example
The following code:
ComboBox<String> fruits = new ComboBox<>();
fruits.getItems().addAll("Apple", "Banana", "Cherry");
assertThat(fruits).containsExactlyItemsInOrder("Apple", "Banana", "Cherry");
will assert that fruits contains exactly (only) the String's
"Apple", "Banana", and "Cherry" in order.-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractComboBoxAssert(javafx.scene.control.ComboBox<T> actual, Class<?> selfType) -
Method Summary
Modifier and TypeMethodDescriptioncontainsExactlyItems(T... items) Verifies that the actualComboBoxcontains exactly the givenitemsin any order.containsExactlyItemsInOrder(T... items) Verifies that the actualComboBoxcontains exactly the givenitemsin order.containsItems(T... items) Verifies that the actualComboBoxcontains at least the givenitemsin any order.containsItemsInOrder(T... items) Verifies that the actualComboBoxcontains at least the givenitemsin order.doesNotHaveExactlyNumItems(int amount) Verifies that the actualComboBoxdoes not have exactly the givenamountof items.doesNotHaveSelectedItem(T selection) Verifies that the actualComboBoxdoes not have the givenselectionas its' selected item.hasExactlyNumItems(int amount) Verifies that the actualComboBoxhas exactly the givenamountof items.hasSelectedItem(T selection) Verifies that the actualComboBoxhas the givenselectionas its' selected item.Methods inherited from class org.testfx.assertions.api.AbstractNodeAssert
doesNotHaveChild, hasChild, hasExactlyChildren, isDisabled, isEnabled, isFocused, isInvisible, isNotFocused, isVisibleMethods inherited from class org.testfx.assertions.api.AbstractStyleableAssert
doesNotHaveId, doesNotHaveStyle, doesNotHaveStyleableParent, doesNotHaveTypeSelector, hasId, hasStyle, hasStyleableParent, hasTypeSelectorMethods 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, withThreadDumpOnErrorMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.assertj.core.api.Descriptable
as, as, as, describedAs, describedAs
-
Constructor Details
-
AbstractComboBoxAssert
-
-
Method Details
-
hasExactlyNumItems
Verifies that the actualComboBoxhas exactly the givenamountof items.- Parameters:
amount- the given amount of items to compare the actual amount of items to- Returns:
- this assertion object
-
doesNotHaveExactlyNumItems
Verifies that the actualComboBoxdoes not have exactly the givenamountof items.- Parameters:
amount- the given amount of items to compare the actual amount of items to- Returns:
- this assertion object
-
hasSelectedItem
Verifies that the actualComboBoxhas the givenselectionas its' selected item.- Parameters:
selection- the given selection to compare the actual selected item to- Returns:
- this assertion object
-
doesNotHaveSelectedItem
Verifies that the actualComboBoxdoes not have the givenselectionas its' selected item.- Parameters:
selection- the given selection to compare the actual selected item to- Returns:
- this assertion object
-
containsItems
Verifies that the actualComboBoxcontains at least the givenitemsin any order.- Parameters:
items- the given items to ensure are at least contained in theComboBoxin any order- Returns:
- this assertion object
-
containsExactlyItems
Verifies that the actualComboBoxcontains exactly the givenitemsin any order.- Parameters:
items- the given items to ensure are the only ones contained in theComboBoxin any order- Returns:
- this assertion object
-
containsItemsInOrder
Verifies that the actualComboBoxcontains at least the givenitemsin order.- Parameters:
items- the given items to ensure are at least contained in theComboBoxin order- Returns:
- this assertion object
-
containsExactlyItemsInOrder
Verifies that the actualComboBoxcontains exactly the givenitemsin order.- Parameters:
items- the given items to ensure are the only ones contained in theComboBoxin order- Returns:
- this assertion object
-