-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to mock Presenter method in Robolectric ? #79
Comments
Hi, I have never tried but it should work if you don't use standard Dagger subcomponent. Here you can find an example of a Robolectric test Let me know if you get some errors |
i have tried this but mocking not happening still it show the original value. Please check my unit test case public class MainPresenter {
} TestRule @RunWith(RobolectricTestRunner.class)
} |
I have done one work around, please let me know this approach is acceptable.
|
Hi, using this work around it works but it's not the best way to do it. Looking at your example there is something strange, why are you invoking |
First of all congratulations for the awesome library. I am new in mockito and robolectric, and just exploring the features.
The following test case how we can write using robolectric.
public class MainActivityMockPresenterTest {
}
The text was updated successfully, but these errors were encountered: