use of org.robolectric.shadows.ShadowMessageQueue in project RxAndroid by ReactiveX.
the class HandlerSchedulerTest method workerSchedulePeriodicallySetAsync.
@Test
public void workerSchedulePeriodicallySetAsync() {
ShadowMessageQueue mainMessageQueue = shadowOf(Looper.getMainLooper().getQueue());
Worker worker = scheduler.createWorker();
worker.schedulePeriodically(new Runnable() {
@Override
public void run() {
}
}, 1, 1, MINUTES);
Message message = mainMessageQueue.getHead();
assertEquals(async, message.isAsynchronous());
}
use of org.robolectric.shadows.ShadowMessageQueue in project RxAndroid by ReactiveX.
the class HandlerSchedulerTest method directScheduleSetAsync.
@Test
public void directScheduleSetAsync() {
ShadowMessageQueue mainMessageQueue = shadowOf(Looper.getMainLooper().getQueue());
scheduler.scheduleDirect(new Runnable() {
@Override
public void run() {
}
});
Message message = mainMessageQueue.getHead();
assertEquals(async, message.isAsynchronous());
}
Aggregations