remove unnecessary mock in BluetoothDeviceUpdaterTest

Bug: 111848213
Test: make -j50 RunSettingsRoboTests
Change-Id: If1c46614ec6e40c66eb121cc48caa1fbc9c39871
This commit is contained in:
timhypeng
2018-08-03 16:53:26 +08:00
committed by tim peng
parent fa44a94aa9
commit 8833bb61d2

View File

@@ -30,11 +30,8 @@ import com.android.settings.SettingsActivity;
import com.android.settings.connecteddevice.DevicePreferenceCallback;
import com.android.settings.dashboard.DashboardFragment;
import com.android.settings.testutils.SettingsRobolectricTestRunner;
import com.android.settingslib.bluetooth.A2dpProfile;
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
import com.android.settingslib.bluetooth.HeadsetProfile;
import com.android.settingslib.bluetooth.LocalBluetoothManager;
import com.android.settingslib.bluetooth.LocalBluetoothProfileManager;
import org.junit.Before;
import org.junit.Test;
@@ -61,12 +58,6 @@ public class BluetoothDeviceUpdaterTest {
private SettingsActivity mSettingsActivity;
@Mock
private LocalBluetoothManager mLocalManager;
@Mock
private LocalBluetoothProfileManager mLocalBluetoothProfileManager;
@Mock
private HeadsetProfile mHeadsetProfile;
@Mock
private A2dpProfile mA2dpProfile;
private Context mContext;
private BluetoothDeviceUpdater mBluetoothDeviceUpdater;
@@ -79,9 +70,6 @@ public class BluetoothDeviceUpdaterTest {
mContext = RuntimeEnvironment.application;
doReturn(mContext).when(mDashboardFragment).getContext();
when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice);
when(mLocalManager.getProfileManager()).thenReturn(mLocalBluetoothProfileManager);
when(mLocalBluetoothProfileManager.getHeadsetProfile()).thenReturn(mHeadsetProfile);
when(mLocalBluetoothProfileManager.getA2dpProfile()).thenReturn(mA2dpProfile);
mPreference = new BluetoothDevicePreference(mContext, mCachedBluetoothDevice, false);
mBluetoothDeviceUpdater =