在谷歌sample for intents看着下面的方法:目的stubAllExternalIntents()在咖啡意图测试
@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));
}
我看到所有的外部意图将被阻止,但我不知道这是否方法起什么作用?
评论清楚地说:“在这种情况下,所有外部意图都将被阻止。”代码也似乎这样做,但你说“它不会阻止这些意图......” 你能否请进一步解释? –