@Test public void testGlobalSubscription() throws Exception { TestSubscriber<Place> testObserver = TestSubscriber.create(); RxOkuki.onAnyPlace(okuki).subscribe(testObserver); verify(okuki).addGlobalListener(isA(GlobalListener.class)); testObserver.unsubscribe(); verify(okuki).removeGlobalListener(isA(GlobalListener.class)); }
public static Observable<Place> onAnyPlace(Okuki okuki) { return Observable.create(new OnGlobalPlaceOnSubscribe(okuki)); }
RxOkuki { public static Observable<Place> onAnyPlace(Okuki okuki) { return Observable.create(new OnGlobalPlaceOnSubscribe(okuki)); } }
RxOkuki { public static Observable<Place> onAnyPlace(Okuki okuki) { return Observable.create(new OnGlobalPlaceOnSubscribe(okuki)); } private  RxOkuki(); }
RxOkuki { public static Observable<Place> onAnyPlace(Okuki okuki) { return Observable.create(new OnGlobalPlaceOnSubscribe(okuki)); } private  RxOkuki(); static Observable<Place> onAnyPlace(Okuki okuki); static Observable<P> onPlace(Okuki okuki, Class<P> clazz); static Observable<Place> onBranch(Okuki okuki, Class<B> clazz); }
RxOkuki { public static Observable<Place> onAnyPlace(Okuki okuki) { return Observable.create(new OnGlobalPlaceOnSubscribe(okuki)); } private  RxOkuki(); static Observable<Place> onAnyPlace(Okuki okuki); static Observable<P> onPlace(Okuki okuki, Class<P> clazz); static Observable<Place> onBranch(Okuki okuki, Class<B> clazz);  }