Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JiglioNero committed Nov 23, 2023
1 parent 14e2566 commit 1495054
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,22 +217,22 @@ public void installerReceiverFilter() throws Exception {
}

@Test
public void createIntentSenderOnAndroidS() {
public void createIntentSenderOnAndroidS() throws NoSuchFieldException, IllegalAccessException {

/* Mock SDK_INT to S. */
Whitebox.setInternalState(Build.VERSION.class, "SDK_INT", Build.VERSION_CODES.S);
createIntentSender(PendingIntent.FLAG_MUTABLE);
}

@Test
public void createIntentSenderOnAndroidLowS() {
public void createIntentSenderOnAndroidLowS() throws NoSuchFieldException, IllegalAccessException {

/* Mock SDK_INT to M. */
Whitebox.setInternalState(Build.VERSION.class, "SDK_INT", Build.VERSION_CODES.M);
createIntentSender(0);
}

private void createIntentSender(int expectedFlag) {
private void createIntentSender(int expectedFlag) throws NoSuchFieldException, IllegalAccessException {
mockStatic(PendingIntent.class);
PendingIntent intent = mock(PendingIntent.class);
IntentSender sender = mock(IntentSender.class);
Expand Down

0 comments on commit 1495054

Please sign in to comment.