OSDN Git Service

Move bluetooth test package to sdk 26
authorjeffreyhuang <jeffreyhuang@google.com>
Mon, 27 Nov 2017 23:42:25 +0000 (15:42 -0800)
committerjeffreyhuang <jeffreyhuang@google.com>
Mon, 27 Nov 2017 23:42:25 +0000 (15:42 -0800)
Test: make RunSettingsRoboTests -j40
Change-Id: I26e6f437052caafd97f3f164b388d379fc890e7e

22 files changed:
tests/robotests/src/com/android/settings/bluetooth/AlwaysDiscoverableTest.java
tests/robotests/src/com/android/settings/bluetooth/BluetoothDetailsButtonsControllerTest.java
tests/robotests/src/com/android/settings/bluetooth/BluetoothDetailsControllerTestBase.java
tests/robotests/src/com/android/settings/bluetooth/BluetoothDeviceDetailsFragmentTest.java
tests/robotests/src/com/android/settings/bluetooth/BluetoothDeviceNamePreferenceControllerTest.java
tests/robotests/src/com/android/settings/bluetooth/BluetoothDevicePreferenceTest.java
tests/robotests/src/com/android/settings/bluetooth/BluetoothDeviceRenamePreferenceControllerTest.java
tests/robotests/src/com/android/settings/bluetooth/BluetoothEnablerTest.java
tests/robotests/src/com/android/settings/bluetooth/BluetoothFilesPreferenceControllerTest.java
tests/robotests/src/com/android/settings/bluetooth/BluetoothMasterSwitchPreferenceControllerTest.java
tests/robotests/src/com/android/settings/bluetooth/BluetoothPairingDetailTest.java
tests/robotests/src/com/android/settings/bluetooth/BluetoothPairingDialogTest.java
tests/robotests/src/com/android/settings/bluetooth/BluetoothPairingPreferenceControllerTest.java
tests/robotests/src/com/android/settings/bluetooth/BluetoothSettingsSummaryProviderTest.java
tests/robotests/src/com/android/settings/bluetooth/BluetoothSettingsTest.java
tests/robotests/src/com/android/settings/bluetooth/BluetoothSummaryUpdaterTest.java
tests/robotests/src/com/android/settings/bluetooth/DeviceListPreferenceFragmentTest.java
tests/robotests/src/com/android/settings/bluetooth/DevicePickerFragmentTest.java
tests/robotests/src/com/android/settings/bluetooth/DeviceProfilesSettingsTest.java
tests/robotests/src/com/android/settings/bluetooth/ForgetDeviceDialogFragmentTest.java
tests/robotests/src/com/android/settings/bluetooth/RemoteDeviceNameDialogFragmentTest.java
tests/robotests/src/com/android/settings/bluetooth/UtilsTest.java

index fd46b4b..3cc90bd 100644 (file)
@@ -41,7 +41,7 @@ import org.mockito.MockitoAnnotations;
 import org.robolectric.annotation.Config;
 
 @RunWith(SettingsRobolectricTestRunner.class)
-@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION_O)
 public class AlwaysDiscoverableTest {
     @Mock
     private LocalBluetoothAdapter mLocalAdapter;
index 7b0a3f2..e7ce7e0 100644 (file)
@@ -43,7 +43,7 @@ import org.robolectric.RuntimeEnvironment;
 import org.robolectric.annotation.Config;
 
 @RunWith(SettingsRobolectricTestRunner.class)
-@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION,
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION_O,
         shadows = SettingsShadowBluetoothDevice.class)
 public class BluetoothDetailsButtonsControllerTest extends BluetoothDetailsControllerTestBase {
     private BluetoothDetailsButtonsController mController;
index 33a5ed5..b03ecc1 100644 (file)
@@ -28,14 +28,20 @@ import android.support.v7.preference.PreferenceManager;
 import android.support.v7.preference.PreferenceScreen;
 
 import com.android.settings.R;
+import com.android.settings.TestConfig;
+import com.android.settings.testutils.SettingsRobolectricTestRunner;
 import com.android.settingslib.bluetooth.CachedBluetoothDevice;
 import com.android.settingslib.core.lifecycle.Lifecycle;
 
 import org.junit.Before;
+import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 import org.robolectric.RuntimeEnvironment;
+import org.robolectric.annotation.Config;
 
+@RunWith(SettingsRobolectricTestRunner.class)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION_O)
 public class BluetoothDetailsControllerTestBase {
     protected Context mContext;
     protected Lifecycle mLifecycle;
index 544b590..cd07a90 100644 (file)
@@ -53,7 +53,7 @@ import org.robolectric.annotation.Config;
 import org.robolectric.fakes.RoboMenu;
 
 @RunWith(SettingsRobolectricTestRunner.class)
-@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION_O)
 public class BluetoothDeviceDetailsFragmentTest {
     private BluetoothDeviceDetailsFragment mFragment;
     private Context mContext;
index 2e094e2..93de52d 100644 (file)
@@ -40,7 +40,7 @@ import org.robolectric.RuntimeEnvironment;
 import org.robolectric.annotation.Config;
 
 @RunWith(SettingsRobolectricTestRunner.class)
-@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION_O)
 public class BluetoothDeviceNamePreferenceControllerTest {
     private static final String DEVICE_NAME = "Nightshade";
     private static final int ORDER = 1;
index bc1151b..3dd97bb 100644 (file)
@@ -49,7 +49,7 @@ import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 @RunWith(SettingsRobolectricTestRunner.class)
-@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION,
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION_O,
         shadows = SettingsShadowResources.class)
 public class BluetoothDevicePreferenceTest {
     private static final boolean SHOW_DEVICES_WITHOUT_NAMES = true;
index cde95cd..186e274 100644 (file)
@@ -43,7 +43,7 @@ import org.robolectric.RuntimeEnvironment;
 import org.robolectric.annotation.Config;
 
 @RunWith(SettingsRobolectricTestRunner.class)
-@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION_O)
 public class BluetoothDeviceRenamePreferenceControllerTest {
 
     private static final String DEVICE_NAME = "Nightshade";
index b973edb..102f0a7 100644 (file)
@@ -58,7 +58,7 @@ import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 @RunWith(SettingsRobolectricTestRunner.class)
-@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION, shadows = {
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION_O, shadows = {
         SettingsShadowResources.class, SettingsShadowResources.SettingsShadowTheme.class
 })
 public class BluetoothEnablerTest {
index cdaf876..ed63fc4 100644 (file)
@@ -35,7 +35,7 @@ import org.robolectric.annotation.Config;
 import org.robolectric.shadows.ShadowApplication;
 
 @RunWith(SettingsRobolectricTestRunner.class)
-@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION_O)
 public class BluetoothFilesPreferenceControllerTest {
     private Context mContext;
     private BluetoothFilesPreferenceController mController;
index c9d5746..534cace 100644 (file)
@@ -47,7 +47,7 @@ import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 @RunWith(SettingsRobolectricTestRunner.class)
-@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION_O)
 public class BluetoothMasterSwitchPreferenceControllerTest {
 
     @Mock(answer = Answers.RETURNS_DEEP_STUBS)
index d1d4935..2b30ae4 100644 (file)
@@ -52,7 +52,7 @@ import org.robolectric.RuntimeEnvironment;
 import org.robolectric.annotation.Config;
 
 @RunWith(SettingsRobolectricTestRunner.class)
-@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION_O)
 public class BluetoothPairingDetailTest {
 
     @Mock
index fba11de..25a24d4 100644 (file)
@@ -53,7 +53,7 @@ import org.robolectric.shadows.ShadowApplication;
 import org.robolectric.util.FragmentTestUtil;
 
 @RunWith(SettingsRobolectricTestRunner.class)
-@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION,
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION_O,
         shadows=ShadowEventLogWriter.class)
 public class BluetoothPairingDialogTest {
 
index 4459f61..192e447 100644 (file)
@@ -49,7 +49,7 @@ import org.robolectric.RuntimeEnvironment;
 import org.robolectric.annotation.Config;
 
 @RunWith(SettingsRobolectricTestRunner.class)
-@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION_O)
 public class BluetoothPairingPreferenceControllerTest {
     private static final int ORDER = 1;
     private Context mContext;
index 0061ee5..e7a66fa 100644 (file)
@@ -35,7 +35,7 @@ import org.robolectric.annotation.Config;
 import static org.mockito.Mockito.verify;
 
 @RunWith(SettingsRobolectricTestRunner.class)
-@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION_O)
 public class BluetoothSettingsSummaryProviderTest {
 
     private Context mContext;
index c772560..b177729 100644 (file)
@@ -50,7 +50,7 @@ import org.robolectric.annotation.Config;
 import java.util.List;
 
 @RunWith(SettingsRobolectricTestRunner.class)
-@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION_O)
 public class BluetoothSettingsTest {
     private static final String FOOTAGE_MAC_STRING = "Bluetooth mac: xxxx";
 
index 0c27412..cb04347 100644 (file)
@@ -51,7 +51,7 @@ import java.util.HashSet;
 import java.util.Set;
 
 @RunWith(SettingsRobolectricTestRunner.class)
-@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION_O)
 public class BluetoothSummaryUpdaterTest {
     private static final String DEVICE_NAME = "Nightshade";
     private static final String DEVICE_KEYBOARD_NAME = "Bluetooth Keyboard";
index 49efecb..169db24 100644 (file)
@@ -49,7 +49,7 @@ import org.robolectric.annotation.Config;
 import java.util.List;
 
 @RunWith(SettingsRobolectricTestRunner.class)
-@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION_O)
 public class DeviceListPreferenceFragmentTest {
     private static final String FOOTAGE_MAC_STRING = "Bluetooth mac: xxxx";
 
index 3294ffd..f9b392e 100644 (file)
@@ -30,7 +30,7 @@ import org.mockito.MockitoAnnotations;
 import org.robolectric.annotation.Config;
 
 @RunWith(SettingsRobolectricTestRunner.class)
-@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION_O)
 public class DevicePickerFragmentTest {
     @Mock
     private LocalBluetoothAdapter mLocalAdapter;
index a6793bb..56454b8 100644 (file)
@@ -56,7 +56,7 @@ import java.util.ArrayList;
 
 
 @RunWith(SettingsRobolectricTestRunner.class)
-@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION, shadows = {
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION_O, shadows = {
         ShadowEventLogWriter.class
 })
 public class DeviceProfilesSettingsTest {
index 9343721..71e9933 100644 (file)
@@ -46,7 +46,7 @@ import org.robolectric.annotation.Config;
 import org.robolectric.shadows.ShadowDialog;
 
 @RunWith(SettingsRobolectricTestRunner.class)
-@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION_O)
 public class ForgetDeviceDialogFragmentTest {
 
     @Mock(answer = Answers.RETURNS_DEEP_STUBS)
index a8ef4e6..65fe46c 100644 (file)
@@ -50,7 +50,7 @@ import org.robolectric.shadows.ShadowDialog;
 import org.robolectric.util.FragmentTestUtil;
 
 @RunWith(SettingsRobolectricTestRunner.class)
-@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION_O)
 public class RemoteDeviceNameDialogFragmentTest {
 
     @Mock(answer = Answers.RETURNS_DEEP_STUBS)
index e0d4638..43583ed 100644 (file)
@@ -41,7 +41,7 @@ import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 @RunWith(SettingsRobolectricTestRunner.class)
-@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION,
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION_O,
         shadows = SettingsShadowResources.class)
 public class UtilsTest {