@Test public void testMainThreadCallsThroughToHookTest() { final AtomicInteger called = new AtomicInteger(); final Scheduler newScheduler = new EmptyScheduler(); RxSwtPlugins.setMainThreadSchedulerHandler(new Function<Scheduler, Scheduler>() { @Override public Scheduler apply(Scheduler scheduler) { called.getAndIncrement(); return newScheduler; } }); assertSame(newScheduler, SwtSchedulers.defaultDisplayThread()); assertEquals(1, called.get()); assertSame(newScheduler, SwtSchedulers.defaultDisplayThread()); assertEquals(2, called.get()); }
public static Scheduler defaultDisplayThread() { return RxSwtPlugins.onMainThreadScheduler(DEFAULT_DISPLAY_THREAD); }
SwtSchedulers { public static Scheduler defaultDisplayThread() { return RxSwtPlugins.onMainThreadScheduler(DEFAULT_DISPLAY_THREAD); } }
SwtSchedulers { public static Scheduler defaultDisplayThread() { return RxSwtPlugins.onMainThreadScheduler(DEFAULT_DISPLAY_THREAD); } private  SwtSchedulers(); }
SwtSchedulers { public static Scheduler defaultDisplayThread() { return RxSwtPlugins.onMainThreadScheduler(DEFAULT_DISPLAY_THREAD); } private  SwtSchedulers(); static Scheduler defaultDisplayThread(); static Scheduler from(Display display); }
SwtSchedulers { public static Scheduler defaultDisplayThread() { return RxSwtPlugins.onMainThreadScheduler(DEFAULT_DISPLAY_THREAD); } private  SwtSchedulers(); static Scheduler defaultDisplayThread(); static Scheduler from(Display display);  }