File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
rxandroid/src/test/java/io/reactivex/rxjava3/android/plugins Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 1+ package io .reactivex .rxjava3 .android .plugins ;
2+
3+ import io .reactivex .rxjava3 .android .schedulers .AndroidSchedulers ;
4+ import io .reactivex .rxjava3 .android .testutil .EmptyScheduler ;
5+ import org .junit .After ;
6+ import org .junit .Before ;
7+ import org .junit .Test ;
8+
9+ import static org .junit .Assert .assertSame ;
10+
11+ public final class RxAndroidPluginsNoRobolectricTest {
12+ @ Before @ After
13+ public void setUpAndTearDown () {
14+ RxAndroidPlugins .reset ();
15+ }
16+
17+ @ Test public void mainThreadSchedulerCanBeReplaced () {
18+ EmptyScheduler emptyScheduler = new EmptyScheduler ();
19+ RxAndroidPlugins .setMainThreadSchedulerHandler (scheduler -> emptyScheduler );
20+ assertSame (emptyScheduler , AndroidSchedulers .mainThread ());
21+ }
22+ }
You can’t perform that action at this time.
0 commit comments