Github user therajanmaurya commented on a diff in the pull request:

    
https://github.com/apache/incubator-taverna-mobile/pull/56#discussion_r169138137
  
    --- Diff: 
app/src/test/java/org/apache/taverna/mobile/utils/RxSchedulersOverrideRule.java 
---
    @@ -4,52 +4,55 @@
     import org.junit.runner.Description;
     import org.junit.runners.model.Statement;
     
    -import rx.Scheduler;
    -import rx.android.plugins.RxAndroidPlugins;
    -import rx.android.plugins.RxAndroidSchedulersHook;
    -import rx.plugins.RxJavaPlugins;
    -import rx.plugins.RxJavaSchedulersHook;
    -import rx.schedulers.Schedulers;
    +import java.util.concurrent.Callable;
     
    +import io.reactivex.Scheduler;
    +import io.reactivex.android.plugins.RxAndroidPlugins;
    +import io.reactivex.functions.Function;
    +import io.reactivex.plugins.RxJavaPlugins;
    +import io.reactivex.schedulers.Schedulers;
     
    -public class RxSchedulersOverrideRule implements TestRule {
    -
    -    private final RxJavaSchedulersHook mRxJavaSchedulersHook = new 
RxJavaSchedulersHook() {
    -        @Override
    -        public Scheduler getIOScheduler() {
    -            return Schedulers.immediate();
    -        }
    -
    -        @Override
    -        public Scheduler getNewThreadScheduler() {
    -            return Schedulers.immediate();
    -        }
    -    };
     
    -    private final RxAndroidSchedulersHook mRxAndroidSchedulersHook = new 
RxAndroidSchedulersHook() {
    -        @Override
    -        public Scheduler getMainThreadScheduler() {
    -            return Schedulers.immediate();
    -        }
    -    };
    +public class RxSchedulersOverrideRule implements TestRule {
     
    +    private final Function<Callable<Scheduler>, Scheduler> 
mRxAndroidSchedulersHook =
    --- End diff --
    
    it's great you started working on Unit test too and thanks for fixing the 
previous test with Rxjava 2.


---

Reply via email to