コード例 #1
0
 // Post the given event to the corresponding event queue for the given component.
 void postEvent(@Nullable Component c, @Nonnull AWTEvent event) {
   // Force an update of the input state, so that we're in synch internally. Otherwise we might
   // post more events before
   // this one gets processed and end up using stale values for those events.
   inputState.update(event);
   EventQueue eventQueue = eventQueueFor(c);
   if (eventQueue != null) {
     eventQueue.postEvent(event);
   }
   pause(settings.delayBetweenEvents());
 }
コード例 #2
0
 private void expectSettingsToReturnDelayBetweenEvents() {
   expect(settings.delayBetweenEvents()).andReturn(WAIT_DELAY);
 }
 @Test
 public void should_check_settings() {
   when(fixture.robot().settings()).thenReturn(settings);
   when(settings.componentLookupScope()).thenReturn(scope);
   assertThat(fixture.requireShowing()).isEqualTo(scope.requireShowing());
 }