本文整理汇总了Java中rx.plugins.RxJavaHooks.reset方法的典型用法代码示例。如果您正苦于以下问题:Java RxJavaHooks.reset方法的具体用法?Java RxJavaHooks.reset怎么用?Java RxJavaHooks.reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rx.plugins.RxJavaHooks
的用法示例。
在下文中一共展示了RxJavaHooks.reset方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: apply
import rx.plugins.RxJavaHooks; //导入方法依赖的package包/类
@Override
public Statement apply(final Statement base, Description description) {
return new Statement() {
@Override
public void evaluate() throws Throwable {
RxAndroidPlugins.getInstance().reset();
RxAndroidPlugins.getInstance().registerSchedulersHook(mRxAndroidSchedulersHook);
RxJavaHooks.reset();
RxJavaHooks.setOnIOScheduler(mRxJavaImmediateScheduler);
RxJavaHooks.setOnNewThreadScheduler(mRxJavaImmediateScheduler);
base.evaluate();
RxAndroidPlugins.getInstance().reset();
RxJavaHooks.reset();
}
};
}
示例2: apply
import rx.plugins.RxJavaHooks; //导入方法依赖的package包/类
@Override
public Statement apply(final Statement base, Description description) {
return new Statement() {
@Override
public void evaluate() throws Throwable {
RxAndroidPlugins.getInstance().reset();
RxAndroidPlugins.getInstance().registerSchedulersHook(rxAndroidSchedulersHook);
RxJavaHooks.reset();
RxJavaHooks.setOnIOScheduler(rxJavaSchedulerHook);
RxJavaHooks.setOnNewThreadScheduler(rxJavaSchedulerHook);
RxJavaHooks.setOnComputationScheduler(rxJavaSchedulerHook);
base.evaluate();
RxAndroidPlugins.getInstance().reset();
RxJavaHooks.reset();
}
};
}
示例3: apply
import rx.plugins.RxJavaHooks; //导入方法依赖的package包/类
@Override
public Statement apply(final Statement base, Description description) {
return new Statement() {
@Override
public void evaluate() throws Throwable {
RxJavaHooks.reset();
RxJavaHooks.setOnIOScheduler(mMockSchedulerFunc);
RxJavaHooks.setOnNewThreadScheduler(mMockSchedulerFunc);
RxAndroidPlugins.getInstance().reset();
RxAndroidPlugins.getInstance().registerSchedulersHook(mRxAndroidSchedulersHook);
base.evaluate();
RxJavaHooks.reset();
RxAndroidPlugins.getInstance().reset();
}
};
}
示例4: apply
import rx.plugins.RxJavaHooks; //导入方法依赖的package包/类
@Override
public Statement apply(final Statement base, Description description) {
return new Statement() {
@Override
public void evaluate() throws Throwable {
RxJavaHooks.reset();
RxAndroidPlugins.getInstance().reset();
RxJavaHooks.setOnIOScheduler(scheduler -> Schedulers.immediate());
RxJavaHooks.setOnNewThreadScheduler(scheduler -> Schedulers.immediate());
RxJavaHooks.setOnComputationScheduler(scheduler -> Schedulers.immediate());
RxAndroidPlugins.getInstance().registerSchedulersHook(mRxAndroidSchedulersHook);
base.evaluate();
RxJavaHooks.reset();
RxAndroidPlugins.getInstance().reset();
}
};
}
示例5: apply
import rx.plugins.RxJavaHooks; //导入方法依赖的package包/类
@Override
public Statement apply(Statement base, Description description) {
return new Statement() {
@Override
public void evaluate() throws Throwable {
RxJavaHooks.reset();
RxJavaHooks.setOnIOScheduler(scheduler -> Schedulers.immediate());
RxJavaHooks.setOnNewThreadScheduler(scheduler -> Schedulers.immediate());
RxJavaHooks.setOnComputationScheduler(scheduler -> Schedulers.immediate());
base.evaluate();
RxJavaHooks.reset();
}
};
}
示例6: setHook
import rx.plugins.RxJavaHooks; //导入方法依赖的package包/类
public void setHook() {
RxJavaHooks.reset();
RxJavaHooks.setOnObservableStart((observable, onSubscribe) -> {
mRxIdlingResource.incrementActiveSubscriptionsCount();
return onSubscribe;
});
RxJavaHooks.setOnObservableSubscribeError(throwable -> {
mRxIdlingResource.decrementActiveSubscriptionsCount();
return throwable;
});
RxJavaHooks.setOnObservableReturn(subscription -> {
mRxIdlingResource.decrementActiveSubscriptionsCount();
return subscription;
});
}
示例7: tearDown
import rx.plugins.RxJavaHooks; //导入方法依赖的package包/类
@CallSuper
@After
public void tearDown() throws Exception {
RxJavaHooks.reset();
RxAndroidPlugins.getInstance().reset();
}
示例8: onDestroy
import rx.plugins.RxJavaHooks; //导入方法依赖的package包/类
@Override
public void onDestroy() {
super.onDestroy();
RxJavaHooks.reset();
}
示例9: tearDown
import rx.plugins.RxJavaHooks; //导入方法依赖的package包/类
@After
public void tearDown() throws Exception {
Espresso.unregisterIdlingResources(rxIdlingResource);
RxJavaHooks.reset();
}
示例10: tearDown
import rx.plugins.RxJavaHooks; //导入方法依赖的package包/类
@After
public void tearDown() throws Exception {
RxJavaHooks.reset();
}
示例11: reset
import rx.plugins.RxJavaHooks; //导入方法依赖的package包/类
public static void reset() {
RxJavaHooks.reset();
RxAndroidPlugins.getInstance().reset();
}
示例12: removeHook
import rx.plugins.RxJavaHooks; //导入方法依赖的package包/类
public void removeHook() {
RxJavaHooks.clear();
RxJavaHooks.reset();
}
示例13: after
import rx.plugins.RxJavaHooks; //导入方法依赖的package包/类
@After
public void after() {
RxJavaHooks.reset();
}
示例14: resetBefore
import rx.plugins.RxJavaHooks; //导入方法依赖的package包/类
@Before
@After
public void resetBefore() {
RxJavaHooks.reset();
}