@Test public void shouldLogOnlyObservableEvents() throws Throwable { loggableObservable.get(observableRule.stringType()).subscribe(subscriber); verify(messageManager).printObservableOnSubscribe(any(ObservableInfo.class)); verify(messageManager).printObservableOnNext(any(ObservableInfo.class)); verify(messageManager).printObservableOnCompleted(any(ObservableInfo.class)); verify(messageManager).printObservableOnTerminate(any(ObservableInfo.class)); verify(messageManager).printObservableOnUnsubscribe(any(ObservableInfo.class)); verifyNoMoreInteractions(messageManager); }
@Override <T> Observable<T> get(T type) throws Throwable { return ((Observable<T>) joinPoint.proceed()) .doOnSubscribe(new Action0() { @Override public void call() { messageManager.printObservableOnSubscribe(observableInfo); } }) .doOnNext(new Action1<T>() { @Override public void call(T value) { messageManager.printObservableOnNext(observableInfo); } }) .doOnError(new Action1<Throwable>() { @Override public void call(Throwable throwable) { messageManager.printObservableOnError(observableInfo, throwable); } }) .doOnCompleted(new Action0() { @Override public void call() { messageManager.printObservableOnCompleted(observableInfo); } }) .doOnTerminate(new Action0() { @Override public void call() { messageManager.printObservableOnTerminate(observableInfo); } }) .doOnUnsubscribe(new Action0() { @Override public void call() { messageManager.printObservableOnUnsubscribe(observableInfo); } }); }
LogEventsObservable extends LoggableObservable { @Override <T> Observable<T> get(T type) throws Throwable { return ((Observable<T>) joinPoint.proceed()) .doOnSubscribe(new Action0() { @Override public void call() { messageManager.printObservableOnSubscribe(observableInfo); } }) .doOnNext(new Action1<T>() { @Override public void call(T value) { messageManager.printObservableOnNext(observableInfo); } }) .doOnError(new Action1<Throwable>() { @Override public void call(Throwable throwable) { messageManager.printObservableOnError(observableInfo, throwable); } }) .doOnCompleted(new Action0() { @Override public void call() { messageManager.printObservableOnCompleted(observableInfo); } }) .doOnTerminate(new Action0() { @Override public void call() { messageManager.printObservableOnTerminate(observableInfo); } }) .doOnUnsubscribe(new Action0() { @Override public void call() { messageManager.printObservableOnUnsubscribe(observableInfo); } }); } }
LogEventsObservable extends LoggableObservable { @Override <T> Observable<T> get(T type) throws Throwable { return ((Observable<T>) joinPoint.proceed()) .doOnSubscribe(new Action0() { @Override public void call() { messageManager.printObservableOnSubscribe(observableInfo); } }) .doOnNext(new Action1<T>() { @Override public void call(T value) { messageManager.printObservableOnNext(observableInfo); } }) .doOnError(new Action1<Throwable>() { @Override public void call(Throwable throwable) { messageManager.printObservableOnError(observableInfo, throwable); } }) .doOnCompleted(new Action0() { @Override public void call() { messageManager.printObservableOnCompleted(observableInfo); } }) .doOnTerminate(new Action0() { @Override public void call() { messageManager.printObservableOnTerminate(observableInfo); } }) .doOnUnsubscribe(new Action0() { @Override public void call() { messageManager.printObservableOnUnsubscribe(observableInfo); } }); } LogEventsObservable(FrodoProceedingJoinPoint joinPoint,
      MessageManager messageManager, ObservableInfo observableInfo); }
LogEventsObservable extends LoggableObservable { @Override <T> Observable<T> get(T type) throws Throwable { return ((Observable<T>) joinPoint.proceed()) .doOnSubscribe(new Action0() { @Override public void call() { messageManager.printObservableOnSubscribe(observableInfo); } }) .doOnNext(new Action1<T>() { @Override public void call(T value) { messageManager.printObservableOnNext(observableInfo); } }) .doOnError(new Action1<Throwable>() { @Override public void call(Throwable throwable) { messageManager.printObservableOnError(observableInfo, throwable); } }) .doOnCompleted(new Action0() { @Override public void call() { messageManager.printObservableOnCompleted(observableInfo); } }) .doOnTerminate(new Action0() { @Override public void call() { messageManager.printObservableOnTerminate(observableInfo); } }) .doOnUnsubscribe(new Action0() { @Override public void call() { messageManager.printObservableOnUnsubscribe(observableInfo); } }); } LogEventsObservable(FrodoProceedingJoinPoint joinPoint,
      MessageManager messageManager, ObservableInfo observableInfo);  }
LogEventsObservable extends LoggableObservable { @Override <T> Observable<T> get(T type) throws Throwable { return ((Observable<T>) joinPoint.proceed()) .doOnSubscribe(new Action0() { @Override public void call() { messageManager.printObservableOnSubscribe(observableInfo); } }) .doOnNext(new Action1<T>() { @Override public void call(T value) { messageManager.printObservableOnNext(observableInfo); } }) .doOnError(new Action1<Throwable>() { @Override public void call(Throwable throwable) { messageManager.printObservableOnError(observableInfo, throwable); } }) .doOnCompleted(new Action0() { @Override public void call() { messageManager.printObservableOnCompleted(observableInfo); } }) .doOnTerminate(new Action0() { @Override public void call() { messageManager.printObservableOnTerminate(observableInfo); } }) .doOnUnsubscribe(new Action0() { @Override public void call() { messageManager.printObservableOnUnsubscribe(observableInfo); } }); } LogEventsObservable(FrodoProceedingJoinPoint joinPoint,
      MessageManager messageManager, ObservableInfo observableInfo);   }