use of com.fernandocejas.frodo.joinpoint.TestJoinPoint in project frodo by android10.
the class LogObservableTest method shouldNotWeaveAroundMethodReturningOtherTypeThanObservable.
@Test
public void shouldNotWeaveAroundMethodReturningOtherTypeThanObservable() {
final TestJoinPoint joinPoint = new TestJoinPoint.Builder(this.getClass(), "toString").withReturnType(this.getClass()).build();
final TestProceedingJoinPoint proceedingJoinPoint = new TestProceedingJoinPoint(joinPoint);
assertThat(LogObservable.methodAnnotatedWithRxLogObservable(proceedingJoinPoint)).isFalse();
}
use of com.fernandocejas.frodo.joinpoint.TestJoinPoint in project frodo by android10.
the class LogSubscriberTest method printOnNextMessageBeforeSubscriberOnNextExecutionWithEmptyValues.
@Test
public void printOnNextMessageBeforeSubscriberOnNextExecutionWithEmptyValues() {
final TestJoinPoint joinPointTest = new TestJoinPoint.Builder(subscriber.getClass()).withParamTypes(String.class).withParamNames("param").withParamValues().build();
logSubscriber.beforeOnNextExecution(joinPointTest);
verify(counter).increment();
verify(stopWatch).start();
verify(messageManager).printSubscriberOnNext(eq(subscriber.getClass().getSimpleName()), anyObject(), anyString());
}
use of com.fernandocejas.frodo.joinpoint.TestJoinPoint in project frodo by android10.
the class LogSubscriberTest method shouldNotWeaveClassOfOtherTypeThanSubscriber.
@Test
public void shouldNotWeaveClassOfOtherTypeThanSubscriber() {
final TestJoinPoint joinPoint = new TestJoinPoint.Builder(this.getClass()).build();
final TestProceedingJoinPoint proceedingJoinPoint = new TestProceedingJoinPoint(joinPoint);
assertThat(LogSubscriber.classAnnotatedWithRxLogSubscriber(proceedingJoinPoint)).isFalse();
}
use of com.fernandocejas.frodo.joinpoint.TestJoinPoint in project frodo by android10.
the class ObservableInfoTest method setUp.
@Before
public void setUp() {
final TestJoinPoint testJoinPoint = new TestJoinPoint.Builder(this.getClass()).withReturnType(Observable.class).withReturnValue(OBSERVABLE_STREAM_VALUE).build();
final FrodoJoinPoint frodoJoinPoint = new FrodoJoinPoint(testJoinPoint);
observableInfo = new ObservableInfo(frodoJoinPoint);
}
use of com.fernandocejas.frodo.joinpoint.TestJoinPoint in project frodo by android10.
the class ObservableRule method apply.
@Override
public Statement apply(Statement statement, Description description) {
final TestJoinPoint testJoinPoint = new TestJoinPoint.Builder(declaringType).withReturnType(Observable.class).withReturnValue(OBSERVABLE_STREAM_VALUE).build();
final TestProceedingJoinPoint testProceedingJoinPoint = new TestProceedingJoinPoint(testJoinPoint);
frodoProceedingJoinPoint = new FrodoProceedingJoinPoint(testProceedingJoinPoint);
observableInfo = new ObservableInfo(frodoProceedingJoinPoint);
return statement;
}
Aggregations