Bourbon icon indicating copy to clipboard operation
Bourbon copied to clipboard

Benefit of using RxSchedulersOverrideRule instead of toBlocking

Open akoufa opened this issue 9 years ago • 1 comments

I would like to know what is the benefit of using the RxSchedulersOverrideRule TestRule instead of the toBlocking? Is it only to avoid attaching toBlocking to every call in every test method? Or the possibility to run the tests on the JVM avoiding the RxAndroid Scheduler?

akoufa avatar Jul 15 '16 13:07 akoufa

I saw that you can bypass the package private without needing to rely on reflection using this trick shown at this link http://fedepaol.github.io/blog/2015/09/13/testing-rxjava-observables-subscriptions/ . This guy just creates a class with package name "rx.plugins" and delegates the method call to the now accessible package private method reset().

akoufa avatar Jul 18 '16 13:07 akoufa