public class AbstractComboBoxAssert<SELF extends AbstractComboBoxAssert<SELF,T>,T> extends AbstractNodeAssert<SELF>
ComboBox type.
To create an instance of this class, invoke .
Assertions.assertThat(ComboBox)
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.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractComboBoxAssert(javafx.scene.control.ComboBox<T> actual,
java.lang.Class<?> selfType) |
| Modifier and Type | Method and Description |
|---|---|
SELF |
containsExactlyItems(T... items)
Verifies that the actual
ComboBox contains exactly the given
items in any order. |
SELF |
containsExactlyItemsInOrder(T... items)
Verifies that the actual
ComboBox contains exactly the given
items in order. |
SELF |
containsItems(T... items)
Verifies that the actual
ComboBox contains at least the given
items in any order. |
SELF |
containsItemsInOrder(T... items)
Verifies that the actual
ComboBox contains at least the given
items in order. |
SELF |
doesNotHaveExactlyNumItems(int amount)
Verifies that the actual
ComboBox does not have exactly the
given amount of items. |
SELF |
doesNotHaveSelectedItem(T selection)
Verifies that the actual
ComboBox does not have the given
selection as its' selected item. |
SELF |
hasExactlyNumItems(int amount)
Verifies that the actual
ComboBox has exactly the given amount
of items. |
SELF |
hasSelectedItem(T selection)
Verifies that the actual
ComboBox has the given selection
as its' selected item. |
doesNotHaveChild, hasChild, hasExactlyChildren, isDisabled, isEnabled, isFocused, isInvisible, isNotFocused, isVisibleas, as, 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, setCustomRepresentation, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, withFailMessage, withRepresentation, withThreadDumpOnErrorprotected AbstractComboBoxAssert(javafx.scene.control.ComboBox<T> actual, java.lang.Class<?> selfType)
public SELF hasExactlyNumItems(int amount)
ComboBox has exactly the given amount
of items.amount - the given amount of items to compare the actual amount of items topublic SELF doesNotHaveExactlyNumItems(int amount)
ComboBox does not have exactly the
given amount of items.amount - the given amount of items to compare the actual amount of items topublic SELF hasSelectedItem(T selection)
ComboBox has the given selection
as its' selected item.selection - the given selection to compare the actual selected item topublic SELF doesNotHaveSelectedItem(T selection)
ComboBox does not have the given
selection as its' selected item.selection - the given selection to compare the actual selected item topublic SELF containsItems(T... items)
ComboBox contains at least the given
items in any order.items - the given items to ensure are at least contained in the ComboBox in
any orderpublic SELF containsExactlyItems(T... items)
ComboBox contains exactly the given
items in any order.items - the given items to ensure are the only ones contained in the ComboBox
in any orderpublic SELF containsItemsInOrder(T... items)
ComboBox contains at least the given
items in order.items - the given items to ensure are at least contained in the ComboBox in order