@Test public void testBranchSubscription() throws Exception { TestSubscriber<Place> testObserver = TestSubscriber.create(); RxOkuki.onBranch(okuki, TestPlace.class).subscribe(testObserver); verify(okuki).addBranchListener(isA(BranchListener.class)); testObserver.unsubscribe(); verify(okuki).removeBranchListener(isA(BranchListener.class)); }
public static <B extends Place> Observable<Place> onBranch(Okuki okuki, Class<B> clazz) { return Observable.create(new OnBranchOnSubscribe<>(okuki, clazz)); }
RxOkuki { public static <B extends Place> Observable<Place> onBranch(Okuki okuki, Class<B> clazz) { return Observable.create(new OnBranchOnSubscribe<>(okuki, clazz)); } }
RxOkuki { public static <B extends Place> Observable<Place> onBranch(Okuki okuki, Class<B> clazz) { return Observable.create(new OnBranchOnSubscribe<>(okuki, clazz)); } private  RxOkuki(); }
RxOkuki { public static <B extends Place> Observable<Place> onBranch(Okuki okuki, Class<B> clazz) { return Observable.create(new OnBranchOnSubscribe<>(okuki, clazz)); } 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 <B extends Place> Observable<Place> onBranch(Okuki okuki, Class<B> clazz) { return Observable.create(new OnBranchOnSubscribe<>(okuki, clazz)); } 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);  }