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

Commit 89485143 authored by Remi NGUYEN VAN's avatar Remi NGUYEN VAN
Browse files

Fix IpClientTest

NetworkStackTests is run with a version of mockito that allows mocking
final methods, which broke mocking of the ConnectivityService.

Test: atest NetworkStackTests
Change-Id: I430fe12216c43a0c4265a504dbefafad37c09291
parent 9d3ce3e5
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -103,9 +103,7 @@ public class IpClientTest {
        MockitoAnnotations.initMocks(this);

        when(mContext.getSystemService(eq(Context.ALARM_SERVICE))).thenReturn(mAlarm);
        when(mContext.getSystemServiceName(ConnectivityManager.class))
                .thenReturn(Context.CONNECTIVITY_SERVICE);
        when(mContext.getSystemService(Context.CONNECTIVITY_SERVICE)).thenReturn(mCm);
        when(mContext.getSystemService(eq(ConnectivityManager.class))).thenReturn(mCm);
        when(mContext.getResources()).thenReturn(mResources);
        when(mResources.getInteger(R.integer.config_networkAvoidBadWifi))
                .thenReturn(DEFAULT_AVOIDBADWIFI_CONFIG_VALUE);