Update Robolectric to 3.4.2

Bug: 66693279
Test: m RunSettingsRoboTests
      m RunSettingsRoboTests-jacoco
Change-Id: I9df619c3d68f0af2ee2ae944a15998275129f7c2
This commit is contained in:
Maurice Lam
2017-09-20 22:20:22 -07:00
parent d0b1297e84
commit e18902ec67
66 changed files with 297 additions and 273 deletions

View File

@@ -17,6 +17,7 @@
package com.android.settings.display;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.reset;
@@ -30,8 +31,8 @@ import android.provider.Settings.System;
import android.support.v7.preference.Preference;
import android.support.v7.preference.PreferenceScreen;
import com.android.settings.testutils.SettingsRobolectricTestRunner;
import com.android.settings.TestConfig;
import com.android.settings.testutils.SettingsRobolectricTestRunner;
import com.android.settings.wrapper.PowerManagerWrapper;
import org.junit.Before;
@@ -41,7 +42,7 @@ import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.annotation.Config;
import org.robolectric.internal.ShadowExtractor;
import org.robolectric.shadow.api.Shadow;
import org.robolectric.shadows.ShadowContentResolver;
@RunWith(SettingsRobolectricTestRunner.class)
@@ -84,8 +85,7 @@ public class BrightnessLevelPreferenceControllerTest {
Context context = RuntimeEnvironment.application;
BrightnessLevelPreferenceController controller =
new BrightnessLevelPreferenceController(context, null, mPowerManager);
ShadowContentResolver shadowContentResolver =
(ShadowContentResolver) ShadowExtractor.extract(context.getContentResolver());
ShadowContentResolver shadowContentResolver = Shadow.extract(context.getContentResolver());
controller.onResume();
@@ -104,8 +104,7 @@ public class BrightnessLevelPreferenceControllerTest {
Context context = RuntimeEnvironment.application;
BrightnessLevelPreferenceController controller =
new BrightnessLevelPreferenceController(context, null, mPowerManager);
ShadowContentResolver shadowContentResolver =
(ShadowContentResolver) ShadowExtractor.extract(context.getContentResolver());
ShadowContentResolver shadowContentResolver = Shadow.extract(context.getContentResolver());
controller.displayPreference(mScreen);
controller.onResume();