public class ListComboBoxFixture extends AbstractComponentFixture<ListComboBoxFixture,com.jidesoft.combobox.ListComboBox,ListComboBoxDriver> implements ItemGroupFixture
ListComboBox.BACKGROUND_PROPERTY, FONT_PROPERTY, FOREGROUND_PROPERTY| Constructor and Description |
|---|
ListComboBoxFixture(Robot robot,
com.jidesoft.combobox.ListComboBox target) |
ListComboBoxFixture(Robot robot,
String comboBoxName) |
| Modifier and Type | Method and Description |
|---|---|
ListComboBoxFixture |
cellReader(AbstractComboBoxCellReader cellReader)
Updates the implementation of
to use when comparing internal values of this fixture's and the values expected
in a test. |
ItemGroupFixture |
clearSelection() |
ListComboBoxFixture |
clickPopupButton() |
String[] |
contents() |
protected ListComboBoxDriver |
createDriver(Robot robot) |
String |
editorText() |
ListComboBoxFixture |
enterText(String text)
Simulates a user entering the specified text in this fixture's
. |
JList |
list()
Finds and returns the
JList in the pop-up raised by this fixture's . |
ListComboBoxFixture |
replaceText(String text)
Simulates a user entering the specified text in the
,
replacing any text. |
ListComboBoxFixture |
requireEditable()
Asserts that this fixture's
is editable. |
ListComboBoxFixture |
requireEditorText(String text) |
ItemGroupFixture |
requireItemCount(int expected) |
ListComboBoxFixture |
requireNoSelection()
Verifies that this fixture's
does not have any
selection. |
ListComboBoxFixture |
requireNotEditable()
Asserts that this fixture's
is not editable. |
ListComboBoxFixture |
requirePopupNotVisible() |
ListComboBoxFixture |
requirePopupVisible() |
ItemGroupFixture |
requireSelection(int index) |
ItemGroupFixture |
requireSelection(Pattern pattern) |
ListComboBoxFixture |
requireSelection(String value)
Verifies that the
String representation of the selected item in this
fixture's matches the given text. |
ListComboBoxFixture |
requireText(String value) |
ListComboBoxFixture |
selectAllText()
Simulates a user selecting the text in the
. |
ListComboBoxFixture |
selectItem(int index)
Simulates a user selecting an item in this fixture's
. |
ItemGroupFixture |
selectItem(Pattern pattern) |
ListComboBoxFixture |
selectItem(String text)
Simulates a user selecting an item in this fixture's
. |
String |
valueAt(int index)
Returns the
String representation of the value of an item in this
fixture's , using this fixture's . |
background, click, click, click, doubleClick, driver, focus, font, foreground, isEnabled, myself, pressAndReleaseKey, pressAndReleaseKeys, pressKey, releaseKey, replaceDriverWith, requireDisabled, requireEnabled, requireEnabled, requireFocused, requireNotVisible, requireShowing, requireVisible, rightClick, robot, target, targetCastedTopublic ListComboBoxFixture(Robot robot, com.jidesoft.combobox.ListComboBox target)
public ListComboBoxFixture replaceText(String text)
ListComboBox,
replacing any text. This action is executed only if the ListComboBox is editable.text - the text to enter.IllegalStateException - if this fixture's ListComboBox is disabled.IllegalStateException - if this fixture's ListComboBox is not showing
on the screen.IllegalStateException - if this fixture's ListComboBox is not
editable.public ListComboBoxFixture selectAllText()
ListComboBox. This
action is executed only if the ListComboBox is editable.IllegalStateException - if this fixture's ListComboBox is disabled.IllegalStateException - if this fixture's ListComboBox is not showing
on the screen.IllegalStateException - if this fixture's ListComboBox is not
editable.public ListComboBoxFixture enterText(String text)
ListComboBox. This action is executed only if the ListComboBox is editable.text - the text to enter.IllegalStateException - if this fixture's ListComboBox is disabled.IllegalStateException - if this fixture's ListComboBox is not showing
on the screen.IllegalStateException - if this fixture's ListComboBox is not
editable.public String editorText()
public ListComboBoxFixture requireEditorText(String text)
public ListComboBoxFixture requirePopupVisible()
public ListComboBoxFixture requirePopupNotVisible()
public JList list()
JList in the pop-up raised by this fixture's ListComboBox.JList in the pop-up raised by this fixture's ListComboBox.ComponentLookupException - if the JList in the pop-up could not be
found.public ItemGroupFixture requireItemCount(int expected)
requireItemCount in interface ItemGroupFixturepublic ListComboBoxFixture selectItem(int index)
ListComboBox.selectItem in interface ItemGroupFixtureindex - the index of the item to select.IllegalStateException - if this fixture's ListComboBox is disabled.IllegalStateException - if this fixture's ListComboBox is not showing
on the screen.IndexOutOfBoundsException - if the given index is negative or greater than the
index of the last item in the ListComboBox.public ListComboBoxFixture selectItem(String text)
ListComboBox.
Value matching is performed by this fixture's JComboBoxCellReader.selectItem in interface ItemGroupFixturetext - the text of the item to select.LocationUnavailableException - if an element matching
the given text cannot be found.IllegalStateException - if this fixture's ListComboBox is disabled.IllegalStateException - if this fixture's ListComboBox is not showing
on the screen.cellReader(org.assertj.swing.jide.grids.driver.AbstractComboBoxCellReader)public String valueAt(int index)
String representation of the value of an item in this
fixture's ListComboBox, using this fixture's JComboBoxCellReader.valueAt in interface ItemGroupFixtureindex - the index of the item to return.String representation of the value of an item in this
fixture's ListComboBox.IndexOutOfBoundsException - if the given index is negative or greater than the
index of the last item in the ListComboBox.cellReader(org.assertj.swing.jide.grids.driver.AbstractComboBoxCellReader)public ItemGroupFixture clearSelection()
clearSelection in interface ItemGroupFixturepublic ItemGroupFixture selectItem(Pattern pattern)
selectItem in interface ItemGroupFixturepublic ItemGroupFixture requireSelection(Pattern pattern)
requireSelection in interface ItemGroupFixturepublic ItemGroupFixture requireSelection(int index)
requireSelection in interface ItemGroupFixturepublic ListComboBoxFixture requireEditable()
ListComboBox is editable.AssertionError - if this fixture's ListComboBox is not editable.public ListComboBoxFixture requireNotEditable()
ListComboBox is not editable.AssertionError - if this fixture's ListComboBox is editable.public ListComboBoxFixture requireSelection(String value)
String representation of the selected item in this
fixture's ListComboBox matches the given text.requireSelection in interface ItemGroupFixturevalue - the text to match.AssertionError - if the selected item does not match the given text.cellReader(org.assertj.swing.jide.grids.driver.AbstractComboBoxCellReader)public ListComboBoxFixture requireText(String value)
public ListComboBoxFixture requireNoSelection()
ListComboBox does not have any
selection.requireNoSelection in interface ItemGroupFixtureAssertionError - if this fixture's ListComboBox has a selection.public ListComboBoxFixture cellReader(AbstractComboBoxCellReader cellReader)
AbstractComboBoxCellReader
to use when comparing internal values of this fixture's ListComboBox and the values expected
in a test. The default implementation to
use is AbstractComboBoxCellReader.cellReader - the new AbstractComboBoxCellReader to use.NullPointerException - if cellReader is null.public String[] contents()
contents in interface ItemGroupFixtureprotected ListComboBoxDriver createDriver(Robot robot)
createDriver in class AbstractComponentFixture<ListComboBoxFixture,com.jidesoft.combobox.ListComboBox,ListComboBoxDriver>public ListComboBoxFixture clickPopupButton()
Copyright © 2014–2016 AssertJ. All rights reserved.