本文整理汇总了Java中android.support.test.espresso.NoActivityResumedException类的典型用法代码示例。如果您正苦于以下问题:Java NoActivityResumedException类的具体用法?Java NoActivityResumedException怎么用?Java NoActivityResumedException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NoActivityResumedException类属于android.support.test.espresso包,在下文中一共展示了NoActivityResumedException类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: cancelCreditCardPayment
import android.support.test.espresso.NoActivityResumedException; //导入依赖的package包/类
private void cancelCreditCardPayment() throws Exception {
Espresso.pressBack();
EspressoTestUtils.waitForView(R.id.activity_payment_method_selection);
Espresso.pressBack();
EspressoTestUtils.waitForView(R.id.verificationTextView);
try {
// Actually this should not be required. However without pressing back one last time; the
// activity cannot be started in the next test. To avoid it; we kill the PaymentResultActivity as well.
Espresso.pressBack();
} catch (final NoActivityResumedException expected) {
// expected
}
}
开发者ID:Adyen,项目名称:adyen-android,代码行数:14,代码来源:PaymentAppTest.java
示例2: goBackN
import android.support.test.espresso.NoActivityResumedException; //导入依赖的package包/类
private void goBackN() {
final int N = 50; // how many times to hit back button
try {
for (int i = 0; i < N; i++)
Espresso.pressBack();
} catch (NoActivityResumedException e) {
Log.e("TAG", "Closed all activities", e);
}
}
开发者ID:fga-gpp-mds,项目名称:2016.2-WikiLegis,代码行数:10,代码来源:LoginFragmentTest.java
示例3: closeAllActivities
import android.support.test.espresso.NoActivityResumedException; //导入依赖的package包/类
public static void closeAllActivities() throws Exception {
for (int i = 0; i < 10; i++) {
try {
pressBack();
} catch (NoActivityResumedException e) {
Log.d(TAG, "you made me do this, android");
return;
}
}
throw new IllegalStateException("what are you doing with 10 open activities?!");
}
开发者ID:Agilitum,项目名称:TextSecureSMP,代码行数:15,代码来源:EspressoUtil.java
注:本文中的android.support.test.espresso.NoActivityResumedException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论