Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

Commit f54b27f

Browse files
SUPERCILEXsamtstern
authored andcommitted
Fix broken tests (#243)
Signed-off-by: Alex Saveau <[email protected]>
1 parent 00b5d34 commit f54b27f

File tree

1 file changed

+0
-54
lines changed

1 file changed

+0
-54
lines changed

easypermissions/src/test/java/pub/devrel/easypermissions/EasyPermissionsTest.java

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -189,24 +189,6 @@ public void shouldShowCorrectDialog_whenMissingPermissionsAndShowRationaleFromAc
189189
assertThatHasExpectedRationale(dialog, RATIONALE);
190190
}
191191

192-
@SuppressWarnings("deprecation")
193-
@Test
194-
public void shouldShowCorrectDialogUsingDeprecated_whenMissingPermissionsAndShowRationaleFromActivity() {
195-
grantPermissions(ONE_PERM);
196-
showRationale(true, ALL_PERMS);
197-
198-
EasyPermissions.requestPermissions(spyActivity, RATIONALE, android.R.string.ok,
199-
android.R.string.cancel, TestActivity.REQUEST_CODE, ALL_PERMS);
200-
201-
Fragment dialogFragment = spyActivity.getFragmentManager()
202-
.findFragmentByTag(RationaleDialogFragment.TAG);
203-
assertThat(dialogFragment).isInstanceOf(RationaleDialogFragment.class);
204-
205-
Dialog dialog = ((RationaleDialogFragment) dialogFragment).getDialog();
206-
assertThatHasExpectedButtonsAndRationale(dialog, RATIONALE,
207-
android.R.string.ok, android.R.string.cancel);
208-
}
209-
210192
@Test
211193
public void shouldShowCorrectDialogUsingRequest_whenMissingPermissionsAndShowRationaleFromActivity() {
212194
grantPermissions(ONE_PERM);
@@ -348,24 +330,6 @@ public void shouldShowCorrectDialog_whenMissingPermissionsAndShowRationaleFromSu
348330
assertThatHasExpectedRationale(dialog, RATIONALE);
349331
}
350332

351-
@SuppressWarnings("deprecation")
352-
@Test
353-
public void shouldShowCorrectDialogUsingDeprecated_whenMissingPermissionsAndShowRationaleFromSupportActivity() {
354-
grantPermissions(ONE_PERM);
355-
showRationale(true, ALL_PERMS);
356-
357-
EasyPermissions.requestPermissions(spySupportActivity, RATIONALE, android.R.string.ok,
358-
android.R.string.cancel, TestSupportActivity.REQUEST_CODE, ALL_PERMS);
359-
360-
android.support.v4.app.Fragment dialogFragment = spySupportActivity.getSupportFragmentManager()
361-
.findFragmentByTag(RationaleDialogFragmentCompat.TAG);
362-
assertThat(dialogFragment).isInstanceOf(RationaleDialogFragmentCompat.class);
363-
364-
Dialog dialog = ((RationaleDialogFragmentCompat) dialogFragment).getDialog();
365-
assertThatHasExpectedButtonsAndRationale(dialog, RATIONALE,
366-
android.R.string.ok, android.R.string.cancel);
367-
}
368-
369333
@Test
370334
public void shouldShowCorrectDialogUsingRequest_whenMissingPermissionsAndShowRationaleFromSupportActivity() {
371335
grantPermissions(ONE_PERM);
@@ -494,24 +458,6 @@ public void shouldRequestPermissions_whenMissingPermissionsAndNotShowRationaleFr
494458
.requestPermissions(ALL_PERMS, TestFragment.REQUEST_CODE);
495459
}
496460

497-
@SuppressWarnings("deprecation")
498-
@Test
499-
public void shouldShowCorrectDialogUsingDeprecated_whenMissingPermissionsAndShowRationaleFromFragment() {
500-
grantPermissions(ONE_PERM);
501-
showRationale(true, ALL_PERMS);
502-
503-
EasyPermissions.requestPermissions(spyFragment, RATIONALE, android.R.string.ok,
504-
android.R.string.cancel, TestFragment.REQUEST_CODE, ALL_PERMS);
505-
506-
android.support.v4.app.Fragment dialogFragment = spyFragment.getChildFragmentManager()
507-
.findFragmentByTag(RationaleDialogFragmentCompat.TAG);
508-
assertThat(dialogFragment).isInstanceOf(RationaleDialogFragmentCompat.class);
509-
510-
Dialog dialog = ((RationaleDialogFragmentCompat) dialogFragment).getDialog();
511-
assertThatHasExpectedButtonsAndRationale(dialog, RATIONALE,
512-
android.R.string.ok, android.R.string.cancel);
513-
}
514-
515461
@Test
516462
public void shouldShowCorrectDialog_whenMissingPermissionsAndShowRationaleFromFragment() {
517463
grantPermissions(ONE_PERM);

0 commit comments

Comments
 (0)