Changeset 946 for trunk/autoquest-core-events-test/src/test/java/de
- Timestamp:
- 10/26/12 10:15:00 (12 years ago)
- Location:
- trunk/autoquest-core-events-test/src/test/java/de/ugoe/cs/autoquest/eventcore/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-events-test/src/test/java/de/ugoe/cs/autoquest/eventcore/gui/KeyInteractionCorrectorTest.java
r927 r946 389 389 // Check if mouse events stay where they are 390 390 input.add(new Event(new KeyPressed(VirtualKey.LETTER_A), guiElement)); 391 input.add(new Event(new MouseButtonDown(Button.LEFT ), guiElement));392 input.add(new Event(new MouseButtonUp(Button.LEFT ), guiElement));393 input.add(new Event(new MouseClick(Button.LEFT ), guiElement));394 input.add(new Event(new KeyReleased(VirtualKey.LETTER_A), guiElement)); 395 396 expected.add(new Event(new KeyTyped(VirtualKey.LETTER_A), guiElement)); 397 expected.add(new Event(new MouseButtonDown(Button.LEFT ), guiElement));398 expected.add(new Event(new MouseButtonUp(Button.LEFT ), guiElement));399 expected.add(new Event(new MouseClick(Button.LEFT ), guiElement));391 input.add(new Event(new MouseButtonDown(Button.LEFT, 0, 0), guiElement)); 392 input.add(new Event(new MouseButtonUp(Button.LEFT, 0, 0), guiElement)); 393 input.add(new Event(new MouseClick(Button.LEFT, 0, 0), guiElement)); 394 input.add(new Event(new KeyReleased(VirtualKey.LETTER_A), guiElement)); 395 396 expected.add(new Event(new KeyTyped(VirtualKey.LETTER_A), guiElement)); 397 expected.add(new Event(new MouseButtonDown(Button.LEFT, 0, 0), guiElement)); 398 expected.add(new Event(new MouseButtonUp(Button.LEFT, 0, 0), guiElement)); 399 expected.add(new Event(new MouseClick(Button.LEFT, 0, 0), guiElement)); 400 400 401 401 List<Event> output = sorter.sortKeyInteractions(input); -
trunk/autoquest-core-events-test/src/test/java/de/ugoe/cs/autoquest/eventcore/gui/MouseClickCondenserTest.java
r927 r946 55 55 IGUIElement element2 = new DummyGUIElement("elem2"); 56 56 57 simulateEvent(new MouseButtonDown(leftBtn ), element1);58 simulateEvent(new MouseButtonUp(leftBtn ), element1);59 simulateEvent(new MouseClick(leftBtn ), element1);57 simulateEvent(new MouseButtonDown(leftBtn, 0, 0), element1); 58 simulateEvent(new MouseButtonUp(leftBtn, 0, 0), element1); 59 simulateEvent(new MouseClick(leftBtn, 0, 0), element1); 60 60 assertCondensedMouseClicks("elem1"); 61 61 62 62 simulateEvent(new DummyInteraction("bla", 1), element1); 63 63 simulateEvent(new DummyInteraction("bli", 1), element1); 64 simulateEvent(new MouseButtonDown(middleBtn ), element1);65 simulateEvent(new MouseButtonUp(middleBtn ), element1);66 simulateEvent(new MouseClick(middleBtn ), element1);64 simulateEvent(new MouseButtonDown(middleBtn, 0, 0), element1); 65 simulateEvent(new MouseButtonUp(middleBtn, 0, 0), element1); 66 simulateEvent(new MouseClick(middleBtn, 0, 0), element1); 67 67 simulateEvent(new DummyInteraction("blo", 1), element1); 68 68 simulateEvent(new DummyInteraction("blu", 1), element1); … … 71 71 simulateEvent(new DummyInteraction("bla", 1), element2); 72 72 simulateEvent(new DummyInteraction("bli", 1), element2); 73 simulateEvent(new MouseButtonDown(rightBtn ), element2);74 simulateEvent(new MouseButtonUp(rightBtn ), element2);75 simulateEvent(new MouseClick(rightBtn ), element2);73 simulateEvent(new MouseButtonDown(rightBtn, 0, 0), element2); 74 simulateEvent(new MouseButtonUp(rightBtn, 0, 0), element2); 75 simulateEvent(new MouseClick(rightBtn, 0, 0), element2); 76 76 simulateEvent(new DummyInteraction("blo", 1), element2); 77 77 simulateEvent(new DummyInteraction("blu", 1), element2); 78 78 assertCondensedMouseClicks("elem1", "", "", "elem1", "", "", "", "", "elem2", "", ""); 79 79 80 simulateEvent(new MouseButtonDown(leftBtn ), element1);81 simulateEvent(new MouseButtonUp(leftBtn ), element1);82 simulateEvent(new MouseClick(leftBtn ), element2);80 simulateEvent(new MouseButtonDown(leftBtn, 0, 0), element1); 81 simulateEvent(new MouseButtonUp(leftBtn, 0, 0), element1); 82 simulateEvent(new MouseClick(leftBtn, 0, 0), element2); 83 83 assertCondensedMouseClicks("elem1", "", "", "elem1", "", "", "", "", "elem2", "", "", 84 84 "", "", "elem2"); 85 85 86 simulateEvent(new MouseButtonDown(middleBtn ), element1);87 simulateEvent(new MouseButtonUp(middleBtn ), element1);88 simulateEvent(new MouseClick(rightBtn ), element1);86 simulateEvent(new MouseButtonDown(middleBtn, 0, 0), element1); 87 simulateEvent(new MouseButtonUp(middleBtn, 0, 0), element1); 88 simulateEvent(new MouseClick(rightBtn, 0, 0), element1); 89 89 simulateEvent(new DummyInteraction("bla", 1), element2); 90 90 assertCondensedMouseClicks("elem1", "", "", "elem1", "", "", "", "", "elem2", "", "", -
trunk/autoquest-core-events-test/src/test/java/de/ugoe/cs/autoquest/eventcore/gui/TextInputDetectorTest.java
r927 r946 164 164 IGUIElement element3 = new DummyGUIElement("elem3"); 165 165 166 simulateEvent(new MouseClick(MouseClick.Button.LEFT ), element2);166 simulateEvent(new MouseClick(MouseClick.Button.LEFT, 0, 0), element2); 167 167 simulateEvent(new KeyPressed(VirtualKey.LETTER_A), element1); 168 168 simulateEvent(new KeyReleased(VirtualKey.LETTER_A), element1); … … 173 173 assertTextInput("", "abc"); 174 174 175 simulateEvent(new MouseClick(MouseClick.Button.LEFT ), element2);176 simulateEvent(new MouseClick(MouseClick.Button.LEFT ), element3);177 simulateEvent(new KeyPressed(VirtualKey.LETTER_A), element1); 178 simulateEvent(new KeyReleased(VirtualKey.LETTER_A), element1); 179 simulateEvent(new KeyPressed(VirtualKey.LETTER_B), element1); 180 simulateEvent(new KeyReleased(VirtualKey.LETTER_B), element1); 181 simulateEvent(new KeyPressed(VirtualKey.LETTER_C), element1); 182 simulateEvent(new KeyReleased(VirtualKey.LETTER_C), element1); 183 simulateEvent(new MouseClick(MouseClick.Button.LEFT ), element3);175 simulateEvent(new MouseClick(MouseClick.Button.LEFT, 0, 0), element2); 176 simulateEvent(new MouseClick(MouseClick.Button.LEFT, 0, 0), element3); 177 simulateEvent(new KeyPressed(VirtualKey.LETTER_A), element1); 178 simulateEvent(new KeyReleased(VirtualKey.LETTER_A), element1); 179 simulateEvent(new KeyPressed(VirtualKey.LETTER_B), element1); 180 simulateEvent(new KeyReleased(VirtualKey.LETTER_B), element1); 181 simulateEvent(new KeyPressed(VirtualKey.LETTER_C), element1); 182 simulateEvent(new KeyReleased(VirtualKey.LETTER_C), element1); 183 simulateEvent(new MouseClick(MouseClick.Button.LEFT, 0, 0), element3); 184 184 assertTextInput("", "abc", "", "", "abc", ""); 185 185 186 simulateEvent(new MouseClick(MouseClick.Button.LEFT ), element2);187 simulateEvent(new MouseClick(MouseClick.Button.LEFT ), element3);188 simulateEvent(new KeyPressed(VirtualKey.LETTER_A), element1); 189 simulateEvent(new KeyReleased(VirtualKey.LETTER_A), element1); 190 simulateEvent(new KeyPressed(VirtualKey.LETTER_B), element1); 191 simulateEvent(new KeyReleased(VirtualKey.LETTER_B), element1); 192 simulateEvent(new KeyPressed(VirtualKey.LETTER_C), element1); 193 simulateEvent(new MouseClick(MouseClick.Button.LEFT ), element3);186 simulateEvent(new MouseClick(MouseClick.Button.LEFT, 0, 0), element2); 187 simulateEvent(new MouseClick(MouseClick.Button.LEFT, 0, 0), element3); 188 simulateEvent(new KeyPressed(VirtualKey.LETTER_A), element1); 189 simulateEvent(new KeyReleased(VirtualKey.LETTER_A), element1); 190 simulateEvent(new KeyPressed(VirtualKey.LETTER_B), element1); 191 simulateEvent(new KeyReleased(VirtualKey.LETTER_B), element1); 192 simulateEvent(new KeyPressed(VirtualKey.LETTER_C), element1); 193 simulateEvent(new MouseClick(MouseClick.Button.LEFT, 0, 0), element3); 194 194 simulateEvent(new KeyReleased(VirtualKey.LETTER_C), element1); 195 195
Note: See TracChangeset
for help on using the changeset viewer.