android10 / Android-CleanArchitecture

This is a sample app that is part of a series of blog posts I have written about how to architect an android application using Uncle Bob's clean architecture approach.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to test presenter method?

pro100svitlo opened this issue · comments

https://github.com/android10/Android-CleanArchitecture/blob/master/presentation/src/androidTest/java/com/fernandocejas/android10/sample/test/presenter/UserDetailsPresenterTest.java

Here, in your example above, you just show how we can test method before execute called.
But how we can check whats happen after? How can we check if there was correct method called when use case return onError(for example)?

Dutch bangla bank joypurhat bangladesh..MD.ASHIKUR RAHMAN KHAN

@pro100svitlo I think your question is related with another issue - #223.

Please, check this comment. I've shared a common solution which I usually use for testing observer methods within presenter.

@epetrenko awesome!
thanks!

@epetrenko Have you any idea about this issue #297 ? Please help...!