Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ba00909 authored by Hyundo Moon's avatar Hyundo Moon Committed by Gerrit Code Review
Browse files

Merge "Fix failing BluetoothOppUtilityTest" into main

parents d93ec832 7ef2afe2
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import static org.mockito.ArgumentMatchers.nullable;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.anyInt;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.mock;
@@ -160,6 +161,9 @@ public class BluetoothOppUtilityTest {
        doReturn(0).when(mCallProxy).contentResolverDelete(any(), any(), nullable(String.class),
                nullable(String[].class));

        // Do nothing since we don't need the actual activity to be launched.
        doNothing().when(spiedContext).startActivity(any());

        BluetoothOppUtility.openReceivedFile(spiedContext, "randomFileName.txt",
                "text/plain", 0L, contentResolverUri);

@@ -229,6 +233,9 @@ public class BluetoothOppUtilityTest {
        doReturn(mockManager).when(spiedContext).getPackageManager();
        doReturn(List.of()).when(mockManager).queryIntentActivities(any(), anyInt());

        // Do nothing since we don't need the actual activity to be launched.
        doNothing().when(spiedContext).startActivity(any());

        BluetoothOppUtility.openReceivedFile(spiedContext, "randomFileName.txt",
                "text/plain", 0L, contentResolverUri);