// 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()); }
private void expectInputStateToBeUpdatedWithEvent() { inputState.update(event); expectLastCall().once(); }