Search in sources :

Example 1 with ShadowDialog

use of org.robolectric.shadows.ShadowDialog in project android_packages_apps_Settings by omnirom.

the class ChooseLockTypeDialogFragmentTest method testThatDialog_IsShown.

@Test
public void testThatDialog_IsShown() {
    AlertDialog latestDialog = startLockFragment();
    assertNotNull(latestDialog);
    ShadowDialog shadowDialog = Shadows.shadowOf(latestDialog);
    // verify that we are looking at the expected dialog.
    assertEquals(shadowDialog.getTitle(), mContext.getString(R.string.setup_lock_settings_options_dialog_title));
}
Also used : ShadowAlertDialog(org.robolectric.shadows.ShadowAlertDialog) AlertDialog(android.app.AlertDialog) ShadowDialog(org.robolectric.shadows.ShadowDialog) Test(org.junit.Test)

Example 2 with ShadowDialog

use of org.robolectric.shadows.ShadowDialog in project android_packages_apps_Settings by SudaMod.

the class ChooseLockTypeDialogFragmentTest method testThatDialog_IsShown.

@Test
public void testThatDialog_IsShown() {
    AlertDialog latestDialog = startLockFragment();
    assertNotNull(latestDialog);
    ShadowDialog shadowDialog = Shadows.shadowOf(latestDialog);
    // verify that we are looking at the expected dialog.
    assertEquals(shadowDialog.getTitle(), mContext.getString(R.string.setup_lock_settings_options_dialog_title));
}
Also used : ShadowAlertDialog(org.robolectric.shadows.ShadowAlertDialog) AlertDialog(android.app.AlertDialog) ShadowDialog(org.robolectric.shadows.ShadowDialog) Test(org.junit.Test)

Example 3 with ShadowDialog

use of org.robolectric.shadows.ShadowDialog in project platform_packages_apps_Settings by BlissRoms.

the class ChooseLockTypeDialogFragmentTest method testThatDialog_IsShown.

@Test
public void testThatDialog_IsShown() {
    AlertDialog latestDialog = startLockFragment();
    assertNotNull(latestDialog);
    ShadowDialog shadowDialog = Shadows.shadowOf(latestDialog);
    // verify that we are looking at the expected dialog.
    assertEquals(shadowDialog.getTitle(), mContext.getString(R.string.setup_lock_settings_options_dialog_title));
}
Also used : ShadowAlertDialog(org.robolectric.shadows.ShadowAlertDialog) AlertDialog(android.app.AlertDialog) ShadowDialog(org.robolectric.shadows.ShadowDialog) Test(org.junit.Test)

Example 4 with ShadowDialog

use of org.robolectric.shadows.ShadowDialog in project android_packages_apps_Settings by LineageOS.

the class ChooseLockTypeDialogFragmentTest method testThatDialog_IsShown.

@Test
public void testThatDialog_IsShown() {
    AlertDialog latestDialog = startLockFragment();
    assertNotNull(latestDialog);
    ShadowDialog shadowDialog = Shadows.shadowOf(latestDialog);
    // verify that we are looking at the expected dialog.
    assertEquals(shadowDialog.getTitle(), mContext.getString(R.string.setup_lock_settings_options_dialog_title));
}
Also used : ShadowAlertDialog(org.robolectric.shadows.ShadowAlertDialog) AlertDialog(android.app.AlertDialog) ShadowDialog(org.robolectric.shadows.ShadowDialog) Test(org.junit.Test)

Example 5 with ShadowDialog

use of org.robolectric.shadows.ShadowDialog in project android_packages_apps_Settings by DirtyUnicorns.

the class ChooseLockTypeDialogFragmentTest method testThatDialog_IsShown.

@Test
public void testThatDialog_IsShown() {
    AlertDialog latestDialog = startLockFragment();
    assertNotNull(latestDialog);
    ShadowDialog shadowDialog = Shadows.shadowOf(latestDialog);
    // verify that we are looking at the expected dialog.
    assertEquals(shadowDialog.getTitle(), mContext.getString(R.string.setup_lock_settings_options_dialog_title));
}
Also used : ShadowAlertDialog(org.robolectric.shadows.ShadowAlertDialog) AlertDialog(android.app.AlertDialog) ShadowDialog(org.robolectric.shadows.ShadowDialog) Test(org.junit.Test)

Aggregations

AlertDialog (android.app.AlertDialog)6 Test (org.junit.Test)6 ShadowAlertDialog (org.robolectric.shadows.ShadowAlertDialog)6 ShadowDialog (org.robolectric.shadows.ShadowDialog)6