use of com.android.settings.testutils.shadow.ShadowAlertDialogCompat in project android_packages_apps_Settings by DirtyUnicorns.
the class SetupSkipDialogTest method dialogMessage_whenSkipPatternSetupForFace_shouldShownCorrectly.
@Test
public void dialogMessage_whenSkipPatternSetupForFace_shouldShownCorrectly() {
SetupSkipDialog setupSkipDialog = SetupSkipDialog.newInstance(true, true, false, false, true);
setupSkipDialog.show(mActivity.getSupportFragmentManager());
AlertDialog alertDialog = ShadowAlertDialogCompat.getLatestAlertDialog();
assertThat(alertDialog).isNotNull();
ShadowAlertDialogCompat shadowAlertDialog = ShadowAlertDialogCompat.shadowOf(alertDialog);
assertThat(mActivity.getString(R.string.lock_screen_pattern_skip_title)).isEqualTo(shadowAlertDialog.getTitle());
assertThat(getSkipDialogMessage(false)).isEqualTo(shadowAlertDialog.getMessage());
}
use of com.android.settings.testutils.shadow.ShadowAlertDialogCompat in project android_packages_apps_Settings by DirtyUnicorns.
the class SetupSkipDialogTest method dialogMessage_whenSkipPatternSetupForFingerprint_shouldShownCorrectly.
@Test
public void dialogMessage_whenSkipPatternSetupForFingerprint_shouldShownCorrectly() {
SetupSkipDialog setupSkipDialog = SetupSkipDialog.newInstance(true, true, false, true, false);
setupSkipDialog.show(mActivity.getSupportFragmentManager());
AlertDialog alertDialog = ShadowAlertDialogCompat.getLatestAlertDialog();
assertThat(alertDialog).isNotNull();
ShadowAlertDialogCompat shadowAlertDialog = ShadowAlertDialogCompat.shadowOf(alertDialog);
assertThat(mActivity.getString(R.string.lock_screen_pattern_skip_title)).isEqualTo(shadowAlertDialog.getTitle());
assertThat(getSkipDialogMessage(true)).isEqualTo(shadowAlertDialog.getMessage());
}
use of com.android.settings.testutils.shadow.ShadowAlertDialogCompat in project android_packages_apps_Settings by DirtyUnicorns.
the class SetupSkipDialogTest method frpMessages_areShownCorrectly_whenSupported.
@Test
public void frpMessages_areShownCorrectly_whenSupported() {
SetupSkipDialog setupSkipDialog = SetupSkipDialog.newInstance(true, false, false, false, false);
setupSkipDialog.show(mActivity.getSupportFragmentManager());
AlertDialog alertDialog = ShadowAlertDialogCompat.getLatestAlertDialog();
assertThat(alertDialog).isNotNull();
ShadowAlertDialogCompat shadowAlertDialog = ShadowAlertDialogCompat.shadowOf(alertDialog);
assertThat(mActivity.getString(R.string.lock_screen_intro_skip_title)).isEqualTo(shadowAlertDialog.getTitle());
assertThat(mActivity.getString(R.string.lock_screen_intro_skip_dialog_text_frp)).isEqualTo(shadowAlertDialog.getMessage());
}
use of com.android.settings.testutils.shadow.ShadowAlertDialogCompat in project android_packages_apps_Settings by DirtyUnicorns.
the class SetupSkipDialogTest method dialogMessage_whenSkipPasswordSetupForFingerprint_shouldShownCorrectly.
@Test
public void dialogMessage_whenSkipPasswordSetupForFingerprint_shouldShownCorrectly() {
SetupSkipDialog setupSkipDialog = SetupSkipDialog.newInstance(true, false, true, true, false);
setupSkipDialog.show(mActivity.getSupportFragmentManager());
AlertDialog alertDialog = ShadowAlertDialogCompat.getLatestAlertDialog();
assertThat(alertDialog).isNotNull();
ShadowAlertDialogCompat shadowAlertDialog = ShadowAlertDialogCompat.shadowOf(alertDialog);
assertThat(mActivity.getString(R.string.lock_screen_password_skip_title)).isEqualTo(shadowAlertDialog.getTitle());
assertThat(getSkipDialogMessage(true)).isEqualTo(shadowAlertDialog.getMessage());
}
use of com.android.settings.testutils.shadow.ShadowAlertDialogCompat in project android_packages_apps_Settings by DirtyUnicorns.
the class SetupSkipDialogTest method frpMessages_areShownCorrectly_whenNotSupported.
@Test
public void frpMessages_areShownCorrectly_whenNotSupported() {
SetupSkipDialog setupSkipDialog = SetupSkipDialog.newInstance(false, false, false, false, false);
setupSkipDialog.show(mActivity.getSupportFragmentManager());
AlertDialog alertDialog = ShadowAlertDialogCompat.getLatestAlertDialog();
assertThat(alertDialog).isNotNull();
ShadowAlertDialogCompat shadowAlertDialog = ShadowAlertDialogCompat.shadowOf(alertDialog);
assertThat(mActivity.getString(R.string.lock_screen_intro_skip_title)).isEqualTo(shadowAlertDialog.getTitle());
assertThat(mActivity.getString(R.string.lock_screen_intro_skip_dialog_text)).isEqualTo(shadowAlertDialog.getMessage());
}
Aggregations