use of com.birbit.android.jobqueue.BatchingScheduler in project android-priority-jobqueue by yigit.
the class BatchingSchedulerTest method testCustomDuration.
@Test
public void testCustomDuration() {
scheduler = mock(Scheduler.class);
timer = new MockTimer();
bs = new BatchingScheduler(scheduler, timer, 123);
MatcherAssert.assertThat(bs.batchingDurationInMs, CoreMatchers.is(123L));
MatcherAssert.assertThat(bs.batchingDurationInNs, CoreMatchers.is(123000000L));
}
use of com.birbit.android.jobqueue.BatchingScheduler in project android-priority-jobqueue by yigit.
the class BatchingSchedulerTest method init.
@Before
public void init() {
scheduler = mock(Scheduler.class);
timer = new MockTimer();
bs = new BatchingScheduler(scheduler, timer);
Context context = mock(Context.class);
when(context.getApplicationContext()).thenReturn(mock(Context.class));
bs.init(context, mock(Scheduler.Callback.class));
}