Why is my compiler not allowing myself to subscribe on an Observable
with a TestSubscriber
?
Here's my code:
TestSubscriber<User> testSubscriber = new TestSubscriber<>();
Observable.just(new User()).subscribe(testSubscriber);
And it's saying that it can't resolve method subscribe
which is taking this parameter. But in all RxJava testing tutorials, they are using TestSubscriber
without such problems. What can I do to test such Observable
?