We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It is currently in below version:
@Test public void testOnCreate() { when(restService.executeServerCall()).thenReturn(true); Robolectric.setupActivity(MainActivity.class); }
which I changed to below version:
@Mock MainPresenter presenter; @Test public void testOnCreate() { when(restService.executeServerCall()).thenReturn(true); MainActivity activity = Robolectric.setupActivity(MainActivity.class); activity.findViewById(R.id.reload).performClick(); verify(presenter).loadData(); }
But it failed due to fail to mock presenter. It seems failed to mock the MainPresenter or I am doing some wrong?
MainPresenter
The text was updated successfully, but these errors were encountered:
It should work, which error do you get? Can you try to change it to understand the single change that makes it fail?
Sorry, something went wrong.
No branches or pull requests
It is currently in below version:
which I changed to below version:
But it failed due to fail to mock presenter. It seems failed to mock the
MainPresenter
or I am doing some wrong?The text was updated successfully, but these errors were encountered: