android - Can't subscribe on a RxJava 2 Observable with TestSubscriber -


why compiler not allowing myself subscribe on observable testsubscriber?

here's code:

testsubscriber<user> testsubscriber = new testsubscriber<>(); observable.just(new user()).subscribe(testsubscriber); 

and it's saying can't resolve method subscribe taking parameter. in rxjava testing tutorials, using testsubscriber without such problems. can test such observable?

it because *subscriber meant flowable while observable uses *observer classes. because reactive-streams standard reserves subscriber compliant publisher interface flowable implements.

additionally rxjava2 reactive classes have .test() method directly give appropriate testing object.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -