org.fest.swing.fixture
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):

Understands simulation of user events on an item belonging to a fixture's Component.

Author:
Yvonne Wang, Alex Ruiz

Method Summary
 ItemFixture drag()
          Simulates a user dragging this fixture's item.
 ItemFixture drop()
          Simulates a user dropping into this fixture's item.
 ItemFixture select()
          Simulates a user selecting this fixture's item.
 JPopupMenuFixture showPopupMenu()
          Shows a pop-up menu using this fixture's item as the invoker of the pop-up menu.
 String value()
          Returns the String representation of this fixture's item, or null if one can not be obtained.
 
Methods inherited from interface org.fest.swing.fixture.MouseInputSimulationFixture
click, click, click, doubleClick, rightClick
 

Method Detail

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.


Copyright © 2007-2011 FEST (Fixtures for Easy Software Testing). All Rights Reserved.