@Test public void testRegister() { sut.register(action1, 0); setupToRun(); context.checking(new Expectations() { { oneOf(action1).run(); oneOf(actionProcessor).setQueueRequests(true); oneOf(actionProcessor).fireQueuedRequests(); oneOf(actionProcessor).setQueueRequests(false); } }); timerHandlerInt.getObject().run(); context.assertIsSatisfied(); }
public void register(final TimerHandler handler, final int period) { Registration reg = new Registration(handler, period); reg.computeNextTime(timeNow()); registrations.add(reg); }
PeriodicEventManager { public void register(final TimerHandler handler, final int period) { Registration reg = new Registration(handler, period); reg.computeNextTime(timeNow()); registrations.add(reg); } }
PeriodicEventManager { public void register(final TimerHandler handler, final int period) { Registration reg = new Registration(handler, period); reg.computeNextTime(timeNow()); registrations.add(reg); } PeriodicEventManager(final long inIdleTimeout, final TimerFactory inTimerFactory,
            final ActionProcessor inActionProcessor); }
PeriodicEventManager { public void register(final TimerHandler handler, final int period) { Registration reg = new Registration(handler, period); reg.computeNextTime(timeNow()); registrations.add(reg); } PeriodicEventManager(final long inIdleTimeout, final TimerFactory inTimerFactory,
            final ActionProcessor inActionProcessor); void register(final TimerHandler handler, final int period); void deregister(final TimerHandler handler); void start(); void userActivityDetected(); }
PeriodicEventManager { public void register(final TimerHandler handler, final int period) { Registration reg = new Registration(handler, period); reg.computeNextTime(timeNow()); registrations.add(reg); } PeriodicEventManager(final long inIdleTimeout, final TimerFactory inTimerFactory,
            final ActionProcessor inActionProcessor); void register(final TimerHandler handler, final int period); void deregister(final TimerHandler handler); void start(); void userActivityDetected();  }