use of com.android.settings.deviceinfo.PrivateVolumeForget.ForgetConfirmFragment in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class PrivateVolumeForgetTest method OnClickListener_shouldCallForget.
@Test
public void OnClickListener_shouldCallForget() {
assertThat(ShadowStorageManager.isForgetCalled()).isFalse();
final Button confirm = mFragment.getView().findViewById(R.id.confirm);
confirm.performClick();
final ForgetConfirmFragment confirmFragment = (ForgetConfirmFragment) mActivity.getSupportFragmentManager().findFragmentByTag(PrivateVolumeForget.TAG_FORGET_CONFIRM);
assertThat(confirmFragment).isNotNull();
final AlertDialog dialog = (AlertDialog) confirmFragment.getDialog();
final Button forget = dialog.getButton(DialogInterface.BUTTON_POSITIVE);
forget.performClick();
assertThat(ShadowStorageManager.isForgetCalled()).isTrue();
}
Aggregations