Может кто-нибудь объяснить, что означает "заглушка" в контексте тестирования? Например, что это означает в комментариях ниже?
@Before
public void stubAllExternalIntents() {
// By default Espresso Intents does not **stub** any Intents. Stubbing needs to be setup before
// every test run. In this case all external Intents will be blocked.
intending(not(isInternal())).respondWith(new ActivityResult(Activity.RESULT_OK, null));
}
ИЛИ здесь:
@Test
public void pickContactButton_click_SelectsPhoneNumber() {
// **Stub** all Intents to ContactsActivity to return VALID_PHONE_NUMBER. Note that the Activity
// is never launched and result is stubbed.
intending(hasComponent(hasShortClassName(".ContactsActivity")))
.respondWith(new ActivityResult(Activity.RESULT_OK,
ContactsActivity.createResultData(VALID_PHONE_NUMBER)));