Пример #1
0
 @Test
 public void dismissDialog_shouldDismissPreviouslyShownDialog() throws Exception {
   final DialogCreatingActivity activity = create(DialogCreatingActivity.class);
   activity.showDialog(1);
   activity.dismissDialog(1);
   Dialog dialog = ShadowDialog.getLatestDialog();
   assertFalse(dialog.isShowing());
 }
Пример #2
0
 @Test(expected = IllegalArgumentException.class)
 public void dismissDialog_shouldThrowExceptionIfDialogWasNotPreviouslyShown() throws Exception {
   final DialogCreatingActivity activity = create(DialogCreatingActivity.class);
   activity.dismissDialog(1);
 }