Prepare tests for impending robolectric merge

Some ShadowUserManager function moved into the basic shadow in
robolectric proper and has been removed from the Settings
ShadowUserManager.

Test: make -j56 RunSettingsRoboTests
Change-Id: I38647dae5d16bc79bc7925ca139c9362a2035393
This commit is contained in:
James Lemieux
2018-11-20 14:26:31 -08:00
parent f611fe8689
commit 3a55de44c5
31 changed files with 125 additions and 198 deletions

View File

@@ -23,6 +23,7 @@ import static org.mockito.Mockito.spy;
import android.content.ContentResolver;
import android.content.Context;
import android.nfc.NfcAdapter;
import android.provider.Settings;
import com.android.settings.R;
@@ -60,7 +61,7 @@ public class AdvancedConnectedDeviceControllerTest {
mContentResolver = mContext.getContentResolver();
mNfcController = new NfcPreferenceController(mContext,
NfcPreferenceController.KEY_TOGGLE_NFC);
mShadowNfcAdapter = Shadows.shadowOf(ShadowNfcAdapter.getNfcAdapter(mContext));
mShadowNfcAdapter = Shadows.shadowOf(NfcAdapter.getNfcAdapter(mContext));
}
@Test
@@ -68,8 +69,7 @@ public class AdvancedConnectedDeviceControllerTest {
AdvancedConnectedDeviceController controller =
new AdvancedConnectedDeviceController(mContext, KEY);
assertThat(controller.getAvailabilityStatus()).isEqualTo(
AVAILABLE);
assertThat(controller.getAvailabilityStatus()).isEqualTo(AVAILABLE);
}
@Test