Interface ItemFixture

All Superinterfaces:
MouseInputSimulationFixture
All Known Subinterfaces:
JTreeNodeFixture
All Known Implementing Classes:
JListItemFixture, JTableCellFixture, JTreePathFixture, JTreeRowFixture

public interface ItemFixture extends MouseInputSimulationFixture
Understands functional testing of GUI component items (e.g. a cell in a JTable or a row in a JList):
  • user input simulation
  • property value query
Understands simulation of user events on an item belonging to a fixture's Component.
  • Method Details

    • select

      ItemFixture select()
      Simulates a user selecting this fixture's item.
      Returns:
      this fixture.
      Throws:
      IllegalStateException - if the component containing this fixture's item is disabled.
      IllegalStateException - if the component containing this fixture's item is not showing on the screen.
    • value

      String value()
      Returns the String representation of this fixture's item, or null if one can not be obtained.
      Returns:
      the String representation of this fixture's item.
    • drag

      ItemFixture drag()
      Simulates a user dragging this fixture's item.
      Returns:
      this fixture.
      Throws:
      IllegalStateException - if the component containing this fixture's item is disabled.
      IllegalStateException - if the component containing this fixture's item is not showing on the screen.
    • drop

      ItemFixture drop()
      Simulates a user dropping into this fixture's item.
      Returns:
      this fixture.
      Throws:
      IllegalStateException - if the component containing this fixture's item is disabled.
      IllegalStateException - if the component containing this fixture's item is not showing on the screen.
      ActionFailedException - if there is no drag action in effect.
    • showPopupMenu

      JPopupMenuFixture showPopupMenu()
      Shows a pop-up menu using this fixture's item as the invoker of the pop-up menu.
      Returns:
      a fixture that handles functional testing of the displayed pop-up menu.
      Throws:
      IllegalStateException - if the component containing this fixture's item is disabled.
      IllegalStateException - if the component containing this fixture's item is not showing on the screen.
      ComponentLookupException - if a pop-up menu cannot be found.