use of com.fernandocejas.frodo.annotation.RxLogObservable in project frodo by android10.
the class LoggableObservableFactoryTest method shouldCreateLogStreamObservable.
@Test
public void shouldCreateLogStreamObservable() {
final RxLogObservable annotation = mock(RxLogObservable.class);
given(annotation.value()).willReturn(RxLogObservable.Scope.STREAM);
final LoggableObservable loggableObservable = observableFactory.create(annotation);
assertThat(loggableObservable).isInstanceOf(LogStreamObservable.class);
}
use of com.fernandocejas.frodo.annotation.RxLogObservable in project frodo by android10.
the class LoggableObservableFactoryTest method shouldCreateLogNothingObservable.
@Test
public void shouldCreateLogNothingObservable() {
final RxLogObservable annotation = mock(RxLogObservable.class);
given(annotation.value()).willReturn(RxLogObservable.Scope.NOTHING);
final LoggableObservable loggableObservable = observableFactory.create(annotation);
assertThat(loggableObservable).isInstanceOf(LogNothingObservable.class);
}
use of com.fernandocejas.frodo.annotation.RxLogObservable in project frodo by android10.
the class LogObservable method methodAnnotatedWithRxLogObservable.
@Pointcut(METHOD)
public static boolean methodAnnotatedWithRxLogObservable(ProceedingJoinPoint joinPoint) {
final FrodoProceedingJoinPoint frodoJoinPoint = new FrodoProceedingJoinPoint(joinPoint);
final Annotation annotation = frodoJoinPoint.getAnnotation(RxLogObservable.class);
return ((MethodSignature) joinPoint.getSignature()).getReturnType() == Observable.class && ((RxLogObservable) annotation).value() != RxLogObservable.Scope.NOTHING;
}
use of com.fernandocejas.frodo.annotation.RxLogObservable in project frodo by android10.
the class LoggableObservableFactoryTest method shouldCreateLogEverythingObservable.
@Test
public void shouldCreateLogEverythingObservable() {
final RxLogObservable annotation = mock(RxLogObservable.class);
given(annotation.value()).willReturn(RxLogObservable.Scope.EVERYTHING);
final LoggableObservable loggableObservable = observableFactory.create(annotation);
assertThat(loggableObservable).isInstanceOf(LogEverythingObservable.class);
}
use of com.fernandocejas.frodo.annotation.RxLogObservable in project frodo by android10.
the class LoggableObservableFactoryTest method shouldCreateLogSchedulersObservable.
@Test
public void shouldCreateLogSchedulersObservable() {
final RxLogObservable annotation = mock(RxLogObservable.class);
given(annotation.value()).willReturn(RxLogObservable.Scope.SCHEDULERS);
final LoggableObservable loggableObservable = observableFactory.create(annotation);
assertThat(loggableObservable).isInstanceOf(LogSchedulersObservable.class);
}
Aggregations