use of android.app.Instrumentation.ActivityResult in project android_packages_apps_Settings by DirtyUnicorns.
the class FingerprintEnrollFinishTest method clickAddAnother_shouldPropagateResults.
@Test
public void clickAddAnother_shouldPropagateResults() {
final ComponentName enrollingComponent = new ComponentName(getTargetContext(), FingerprintEnrollEnrolling.class);
intending(hasComponent(enrollingComponent)).respondWith(new ActivityResult(Activity.RESULT_OK, null));
onView(withId(R.id.add_another_button)).perform(click());
intended(hasComponent(enrollingComponent));
assertTrue(mActivityRule.getActivity().isFinishing());
}
use of android.app.Instrumentation.ActivityResult in project android_packages_apps_Settings by DirtyUnicorns.
the class FingerprintEnrollFinishTest method clickAddAnother_shouldLaunchEnrolling.
@Test
public void clickAddAnother_shouldLaunchEnrolling() {
final ComponentName enrollingComponent = new ComponentName(getTargetContext(), FingerprintEnrollEnrolling.class);
intending(hasComponent(enrollingComponent)).respondWith(new ActivityResult(Activity.RESULT_CANCELED, null));
onView(withId(R.id.add_another_button)).perform(click());
intended(hasComponent(enrollingComponent));
assertFalse(mActivityRule.getActivity().isFinishing());
}
use of android.app.Instrumentation.ActivityResult in project android_packages_apps_Settings by crdroidandroid.
the class FingerprintEnrollFinishTest method clickAddAnother_shouldLaunchEnrolling.
@Test
public void clickAddAnother_shouldLaunchEnrolling() {
final ComponentName enrollingComponent = new ComponentName(getTargetContext(), FingerprintEnrollEnrolling.class);
intending(hasComponent(enrollingComponent)).respondWith(new ActivityResult(Activity.RESULT_CANCELED, null));
onView(withId(R.id.add_another_button)).perform(click());
intended(hasComponent(enrollingComponent));
assertFalse(mActivityRule.getActivity().isFinishing());
}
use of android.app.Instrumentation.ActivityResult in project android-testing by googlesamples.
the class ImageViewerActivityTest method stubCameraIntent.
@Before
public void stubCameraIntent() {
// Initializes Intents and begins recording intents.
Intents.init();
ActivityResult result = createImageCaptureActivityResultStub();
// Stub the Intent.
intending(hasAction(MediaStore.ACTION_IMAGE_CAPTURE)).respondWith(result);
}
use of android.app.Instrumentation.ActivityResult in project platform_packages_apps_Settings by BlissRoms.
the class FingerprintEnrollFinishTest method clickAddAnother_shouldLaunchEnrolling.
@Test
public void clickAddAnother_shouldLaunchEnrolling() {
final ComponentName enrollingComponent = new ComponentName(getTargetContext(), FingerprintEnrollEnrolling.class);
intending(hasComponent(enrollingComponent)).respondWith(new ActivityResult(Activity.RESULT_CANCELED, null));
onView(withId(R.id.add_another_button)).perform(click());
intended(hasComponent(enrollingComponent));
assertFalse(mActivityRule.getActivity().isFinishing());
}
Aggregations