Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 1014 Bytes

File metadata and controls

28 lines (22 loc) · 1014 Bytes

Gionic Build Status

Gionic is a test tool for Java AWT/Swing event simulating. You can use Gionic to unit-test with some listeners.

Modules

  • Gionic-core: Include the core api
  • Gionic-awt : Include a simulator which simulate mouse, mouseMotion and key events

To set a event dispatch target

  • From Component
Component component = getComponentFromSomeWhere();
Simulator simulator = Gionic.control( component );
  • From MouseListener, MouseMotionListener, KeyListener and MouseAdapter
MouseListener listener = getMouseListenerFromSomeWhere();
Simulator simulator    = Gionic.control( listener );

To simulate some events

  • simulator.click().forTimes( 5 ).at( 10, 10 )
  • simulator.press().atSomeWhere()
  • simulator.drag().from( 0,0 ).to( 5,5 ).endHere()
  • simulator.keyPress().of( MouseEvent.VK_CONTROL )
  • simulator.keyType().of( 'A' )