|
|||||||||
| Home >> All >> abbot >> editor >> [ recorder overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
abbot.editor.recorder
Class EventRecorderTest

java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
abbot.editor.recorder.AbstractRecorderTest
abbot.editor.recorder.EventRecorderTest
- All Implemented Interfaces:
- AbstractRecorderTest.StepThunk, java.awt.event.ActionListener, java.util.EventListener, junit.framework.Test
- public class EventRecorderTest
- extends AbstractRecorderTest
- implements java.awt.event.ActionListener, AbstractRecorderTest.StepThunk
- extends AbstractRecorderTest
Unit test to verify proper capture of multiple user semantic events when parsed from a continuous event stream. FIXME add support to feed the event recorder an event sequence and have it do its cleanup FIXME add support to feed the event recorder an event sequence to record Still want to do the robot generation, 'cuz that'll catch errors on new platforms. Specific event sequences avoid having to throw up an IF.
| Nested Class Summary |
| Nested classes inherited from class abbot.editor.recorder.AbstractRecorderTest |
AbstractRecorderTest.StepThunk |
| Field Summary | |
private EventRecorder |
recorder
|
private abbot.script.Step |
step
|
private javax.swing.JFrame |
subframe
|
private boolean |
suppressKeyTypedEvents
|
| Fields inherited from class abbot.editor.recorder.AbstractRecorderTest |
helper, watcher |
| Fields inherited from class junit.framework.TestCase |
|
| Constructor Summary | |
EventRecorderTest(java.lang.String name)
Create a new test case with the given name. |
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent ev)
Will be invoked when the recorder posts status messages. |
abbot.script.Step |
getStep()
|
static void |
main(java.lang.String[] args)
|
protected void |
setUp()
Sets up the fixture, for example, open a network connection. |
private javax.swing.JTextField |
showTextField()
Display a text field, already focused. |
private void |
startRecording()
|
private void |
stopRecording()
Send the event recorder termination sequence. |
static junit.framework.Test |
suite()
Provide a default test suite for this test case. |
protected void |
tearDown()
Tears down the fixture, for example, close a network connection. |
void |
testClickWithDialog()
|
void |
testMacModifierStripping()
|
void |
testRecordFocusTraversal()
Tabs are used for focus traversal. |
void |
testRecordJumbledKeyEvents()
Test an event stream from rapidly typed keys. |
void |
testRecordKeyString()
Should save no individual key press/release events. |
void |
testRecordKeyStringPartiallyShifted()
Should save no modifiers, since the modifier gets incorporated into each key stroke. |
void |
testRecordKeyStringShifted()
Should save no modifiers or individual key press/release. |
void |
testRecordKeyStrokeInput()
Keystrokes with modifiers other than shift should be saved as keystrokes rather than keystrings. |
void |
testRecordMetaKey()
|
void |
testRecordModifier()
A modifier down/up should be captured that way. |
void |
testRecordNumPad()
Should capture numeric keypad events if numlock is down. |
void |
testRecordSingleKey()
Ensure that a single key press results in a single keystroke event. |
void |
testRecordWithNoKeyTypedEvents()
|
| Methods inherited from class abbot.editor.recorder.AbstractRecorderTest |
assertStep, assertStepCount, bugInfo, toString, waitForStep |
| Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString |
| Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
recorder
private EventRecorder recorder
suppressKeyTypedEvents
private boolean suppressKeyTypedEvents
step
private volatile abbot.script.Step step
subframe
private javax.swing.JFrame subframe
| Constructor Detail |
EventRecorderTest
public EventRecorderTest(java.lang.String name)
- Create a new test case with the given name.
| Method Detail |
getStep
public abbot.script.Step getStep()
- Specified by:
getStepin interfaceAbstractRecorderTest.StepThunk
startRecording
private void startRecording()
stopRecording
private void stopRecording()
- Send the event recorder termination sequence.
testClickWithDialog
public void testClickWithDialog()
showTextField
private javax.swing.JTextField showTextField()
- Display a text field, already focused.
testRecordSingleKey
public void testRecordSingleKey()
- Ensure that a single key press results in a single keystroke event.
testRecordNumPad
public void testRecordNumPad()
- Should capture numeric keypad events if numlock is down.
Test twice so that we can catch both states of the num lock key.
Restore the num lock state when we're done.
testRecordKeyString
public void testRecordKeyString()
- Should save no individual key press/release events.
testRecordKeyStringShifted
public void testRecordKeyStringShifted()
- Should save no modifiers or individual key press/release.
testRecordKeyStringPartiallyShifted
public void testRecordKeyStringPartiallyShifted()
- Should save no modifiers, since the modifier gets incorporated into
each key stroke.
testRecordModifier
public void testRecordModifier()
- A modifier down/up should be captured that way.
testRecordMetaKey
public void testRecordMetaKey()
testRecordWithNoKeyTypedEvents
public void testRecordWithNoKeyTypedEvents()
testRecordJumbledKeyEvents
public void testRecordJumbledKeyEvents()
- Test an event stream from rapidly typed keys.
testRecordFocusTraversal
public void testRecordFocusTraversal()
- Tabs are used for focus traversal.
testRecordKeyStrokeInput
public void testRecordKeyStrokeInput()
- Keystrokes with modifiers other than shift should be saved as
keystrokes rather than keystrings.
testMacModifierStripping
public void testMacModifierStripping()
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent ev)
- Will be invoked when the recorder posts status messages.
- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener
setUp
protected void setUp()
- Description copied from class:
junit.framework.TestCase - Sets up the fixture, for example, open a network connection.
This method is called before a test is executed.
- Overrides:
setUpin classAbstractRecorderTest
tearDown
protected void tearDown()
- Description copied from class:
junit.framework.TestCase - Tears down the fixture, for example, close a network connection.
This method is called after a test is executed.
- Overrides:
tearDownin classAbstractRecorderTest
suite
public static junit.framework.Test suite()
- Provide a default test suite for this test case.
main
public static void main(java.lang.String[] args)
|
|||||||||
| Home >> All >> abbot >> editor >> [ recorder overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC