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

Commit 1eeff3f7 authored by Ying Xu's avatar Ying Xu Committed by Automerger Merge Worker
Browse files

Merge "Mock the makeCopy() method in the unit test" into sc-dev am: 1ce4cdb8

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14343768

Change-Id: I446baf5c73c9fb4a832eabbddf5167b8a8faab23
parents 7d0edaf6 1ce4cdb8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ import static junit.framework.Assert.assertEquals;

import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.Matchers.anyLong;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

@@ -309,6 +310,7 @@ public class NetworkControllerWifiTest extends NetworkControllerBaseTest {
        // Put RSSI in the middle of the range.
        rssi += amountPerLevel / 2;
        when(mVcnTransportInfo.getWifiInfo()).thenReturn(mWifiInfo);
        when(mVcnTransportInfo.makeCopy(anyLong())).thenReturn(mVcnTransportInfo);
        when(mWifiInfo.getRssi()).thenReturn(rssi);
        when(mWifiInfo.isCarrierMerged()).thenReturn(true);
        when(mWifiInfo.getSubscriptionId()).thenReturn(1);
@@ -318,6 +320,7 @@ public class NetworkControllerWifiTest extends NetworkControllerBaseTest {

    protected void setWifiStateForVcn(boolean connected, String ssid) {
        when(mVcnTransportInfo.getWifiInfo()).thenReturn(mWifiInfo);
        when(mVcnTransportInfo.makeCopy(anyLong())).thenReturn(mVcnTransportInfo);
        when(mWifiInfo.getSSID()).thenReturn(ssid);
        when(mWifiInfo.isCarrierMerged()).thenReturn(true);
        when(mWifiInfo.getSubscriptionId()).thenReturn(1);