Skip to content

Instantly share code, notes, and snippets.

Wassim Beltaief WassimBenltaief

Block or report user

Report or block WassimBenltaief

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@WassimBenltaief
WassimBenltaief / RxSchedulersOverrideRule.java
Created Feb 10, 2016
RxAndroidTestSchedulerHook and RxJavaTestSchedulerHook as TestRule
View RxSchedulersOverrideRule.java
public class RxSchedulersOverrideRule implements TestRule {
private final RxJavaSchedulersHook mRxJavaSchedulersHook = new RxJavaSchedulersHook() {
@Override
public Scheduler getIOScheduler() {
return Schedulers.immediate();
}
@Override
public Scheduler getNewThreadScheduler() {
@WassimBenltaief
WassimBenltaief / PublishSubjectEmitOnObservableCompleted.java
Last active Feb 4, 2016
PublishSubject emmiting value when a private Observable is completed
View PublishSubjectEmitOnObservableCompleted.java
public class Main {
public static void main(String [] args) {
final PublishSubject<Boolean> subject = PublishSubject.create();
subject.subscribe(new Observer<Boolean>() {
@Override
public void onCompleted() {
You can’t perform that action at this time.