According to what I understand, you want it to work like this:
if nextQuestionButton
IS enabled, then take following actions:
- click on 'wrong answer',
- check if
nextQuestionButton
changed stated to NOT enabled.
If this is so, the code should be like this:
onView(withId(R.id.nextQuestionButton)).check(matches(isEnabled()));
onView(withText("wrong answer")).perform(click());
onView(withId(R.id.nextQuestionButton)).check(matches(not(isEnabled())));
Espresso allows you to use Hamcrest matchers in tests.
Hamcrest 1.3 Quick Reference.
Please check also this (if you haven't done that already):
Espresso 2.1. Espresso Cheat Sheet Master [updated]
According to this fragment of your post:
When launching the test, nothing is reported, whereas nextQuestionButton
should not be enabled upon clicking the radioButton
whose text is "wrong answer".
It means that you hadn't set disabled your next question button, so Espresso passes this test.