Move bluetooth test package to sdk 26
Test: make RunSettingsRoboTests -j40 Change-Id: I26e6f437052caafd97f3f164b388d379fc890e7e
This commit is contained in:
@@ -41,7 +41,7 @@ import org.mockito.MockitoAnnotations;
|
|||||||
import org.robolectric.annotation.Config;
|
import org.robolectric.annotation.Config;
|
||||||
|
|
||||||
@RunWith(SettingsRobolectricTestRunner.class)
|
@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 {
|
public class AlwaysDiscoverableTest {
|
||||||
@Mock
|
@Mock
|
||||||
private LocalBluetoothAdapter mLocalAdapter;
|
private LocalBluetoothAdapter mLocalAdapter;
|
||||||
|
@@ -43,7 +43,7 @@ import org.robolectric.RuntimeEnvironment;
|
|||||||
import org.robolectric.annotation.Config;
|
import org.robolectric.annotation.Config;
|
||||||
|
|
||||||
@RunWith(SettingsRobolectricTestRunner.class)
|
@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)
|
shadows = SettingsShadowBluetoothDevice.class)
|
||||||
public class BluetoothDetailsButtonsControllerTest extends BluetoothDetailsControllerTestBase {
|
public class BluetoothDetailsButtonsControllerTest extends BluetoothDetailsControllerTestBase {
|
||||||
private BluetoothDetailsButtonsController mController;
|
private BluetoothDetailsButtonsController mController;
|
||||||
|
@@ -28,14 +28,20 @@ import android.support.v7.preference.PreferenceManager;
|
|||||||
import android.support.v7.preference.PreferenceScreen;
|
import android.support.v7.preference.PreferenceScreen;
|
||||||
|
|
||||||
import com.android.settings.R;
|
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.bluetooth.CachedBluetoothDevice;
|
||||||
import com.android.settingslib.core.lifecycle.Lifecycle;
|
import com.android.settingslib.core.lifecycle.Lifecycle;
|
||||||
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
import org.mockito.Mock;
|
import org.mockito.Mock;
|
||||||
import org.mockito.MockitoAnnotations;
|
import org.mockito.MockitoAnnotations;
|
||||||
import org.robolectric.RuntimeEnvironment;
|
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 {
|
public class BluetoothDetailsControllerTestBase {
|
||||||
protected Context mContext;
|
protected Context mContext;
|
||||||
protected Lifecycle mLifecycle;
|
protected Lifecycle mLifecycle;
|
||||||
|
@@ -53,7 +53,7 @@ import org.robolectric.annotation.Config;
|
|||||||
import org.robolectric.fakes.RoboMenu;
|
import org.robolectric.fakes.RoboMenu;
|
||||||
|
|
||||||
@RunWith(SettingsRobolectricTestRunner.class)
|
@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 {
|
public class BluetoothDeviceDetailsFragmentTest {
|
||||||
private BluetoothDeviceDetailsFragment mFragment;
|
private BluetoothDeviceDetailsFragment mFragment;
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
|
@@ -40,7 +40,7 @@ import org.robolectric.RuntimeEnvironment;
|
|||||||
import org.robolectric.annotation.Config;
|
import org.robolectric.annotation.Config;
|
||||||
|
|
||||||
@RunWith(SettingsRobolectricTestRunner.class)
|
@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 {
|
public class BluetoothDeviceNamePreferenceControllerTest {
|
||||||
private static final String DEVICE_NAME = "Nightshade";
|
private static final String DEVICE_NAME = "Nightshade";
|
||||||
private static final int ORDER = 1;
|
private static final int ORDER = 1;
|
||||||
|
@@ -49,7 +49,7 @@ import static org.mockito.Mockito.verify;
|
|||||||
import static org.mockito.Mockito.when;
|
import static org.mockito.Mockito.when;
|
||||||
|
|
||||||
@RunWith(SettingsRobolectricTestRunner.class)
|
@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)
|
shadows = SettingsShadowResources.class)
|
||||||
public class BluetoothDevicePreferenceTest {
|
public class BluetoothDevicePreferenceTest {
|
||||||
private static final boolean SHOW_DEVICES_WITHOUT_NAMES = true;
|
private static final boolean SHOW_DEVICES_WITHOUT_NAMES = true;
|
||||||
|
@@ -43,7 +43,7 @@ import org.robolectric.RuntimeEnvironment;
|
|||||||
import org.robolectric.annotation.Config;
|
import org.robolectric.annotation.Config;
|
||||||
|
|
||||||
@RunWith(SettingsRobolectricTestRunner.class)
|
@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 {
|
public class BluetoothDeviceRenamePreferenceControllerTest {
|
||||||
|
|
||||||
private static final String DEVICE_NAME = "Nightshade";
|
private static final String DEVICE_NAME = "Nightshade";
|
||||||
|
@@ -58,7 +58,7 @@ import static org.mockito.Mockito.verify;
|
|||||||
import static org.mockito.Mockito.when;
|
import static org.mockito.Mockito.when;
|
||||||
|
|
||||||
@RunWith(SettingsRobolectricTestRunner.class)
|
@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
|
SettingsShadowResources.class, SettingsShadowResources.SettingsShadowTheme.class
|
||||||
})
|
})
|
||||||
public class BluetoothEnablerTest {
|
public class BluetoothEnablerTest {
|
||||||
|
@@ -35,7 +35,7 @@ import org.robolectric.annotation.Config;
|
|||||||
import org.robolectric.shadows.ShadowApplication;
|
import org.robolectric.shadows.ShadowApplication;
|
||||||
|
|
||||||
@RunWith(SettingsRobolectricTestRunner.class)
|
@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 {
|
public class BluetoothFilesPreferenceControllerTest {
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
private BluetoothFilesPreferenceController mController;
|
private BluetoothFilesPreferenceController mController;
|
||||||
|
@@ -47,7 +47,7 @@ import static org.mockito.Mockito.verify;
|
|||||||
import static org.mockito.Mockito.when;
|
import static org.mockito.Mockito.when;
|
||||||
|
|
||||||
@RunWith(SettingsRobolectricTestRunner.class)
|
@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 {
|
public class BluetoothMasterSwitchPreferenceControllerTest {
|
||||||
|
|
||||||
@Mock(answer = Answers.RETURNS_DEEP_STUBS)
|
@Mock(answer = Answers.RETURNS_DEEP_STUBS)
|
||||||
|
@@ -52,7 +52,7 @@ import org.robolectric.RuntimeEnvironment;
|
|||||||
import org.robolectric.annotation.Config;
|
import org.robolectric.annotation.Config;
|
||||||
|
|
||||||
@RunWith(SettingsRobolectricTestRunner.class)
|
@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 {
|
public class BluetoothPairingDetailTest {
|
||||||
|
|
||||||
@Mock
|
@Mock
|
||||||
|
@@ -53,7 +53,7 @@ import org.robolectric.shadows.ShadowApplication;
|
|||||||
import org.robolectric.util.FragmentTestUtil;
|
import org.robolectric.util.FragmentTestUtil;
|
||||||
|
|
||||||
@RunWith(SettingsRobolectricTestRunner.class)
|
@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)
|
shadows=ShadowEventLogWriter.class)
|
||||||
public class BluetoothPairingDialogTest {
|
public class BluetoothPairingDialogTest {
|
||||||
|
|
||||||
|
@@ -49,7 +49,7 @@ import org.robolectric.RuntimeEnvironment;
|
|||||||
import org.robolectric.annotation.Config;
|
import org.robolectric.annotation.Config;
|
||||||
|
|
||||||
@RunWith(SettingsRobolectricTestRunner.class)
|
@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 {
|
public class BluetoothPairingPreferenceControllerTest {
|
||||||
private static final int ORDER = 1;
|
private static final int ORDER = 1;
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
|
@@ -35,7 +35,7 @@ import org.robolectric.annotation.Config;
|
|||||||
import static org.mockito.Mockito.verify;
|
import static org.mockito.Mockito.verify;
|
||||||
|
|
||||||
@RunWith(SettingsRobolectricTestRunner.class)
|
@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 {
|
public class BluetoothSettingsSummaryProviderTest {
|
||||||
|
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
|
@@ -50,7 +50,7 @@ import org.robolectric.annotation.Config;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@RunWith(SettingsRobolectricTestRunner.class)
|
@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 {
|
public class BluetoothSettingsTest {
|
||||||
private static final String FOOTAGE_MAC_STRING = "Bluetooth mac: xxxx";
|
private static final String FOOTAGE_MAC_STRING = "Bluetooth mac: xxxx";
|
||||||
|
|
||||||
|
@@ -51,7 +51,7 @@ import java.util.HashSet;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
@RunWith(SettingsRobolectricTestRunner.class)
|
@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 {
|
public class BluetoothSummaryUpdaterTest {
|
||||||
private static final String DEVICE_NAME = "Nightshade";
|
private static final String DEVICE_NAME = "Nightshade";
|
||||||
private static final String DEVICE_KEYBOARD_NAME = "Bluetooth Keyboard";
|
private static final String DEVICE_KEYBOARD_NAME = "Bluetooth Keyboard";
|
||||||
|
@@ -49,7 +49,7 @@ import org.robolectric.annotation.Config;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@RunWith(SettingsRobolectricTestRunner.class)
|
@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 {
|
public class DeviceListPreferenceFragmentTest {
|
||||||
private static final String FOOTAGE_MAC_STRING = "Bluetooth mac: xxxx";
|
private static final String FOOTAGE_MAC_STRING = "Bluetooth mac: xxxx";
|
||||||
|
|
||||||
|
@@ -30,7 +30,7 @@ import org.mockito.MockitoAnnotations;
|
|||||||
import org.robolectric.annotation.Config;
|
import org.robolectric.annotation.Config;
|
||||||
|
|
||||||
@RunWith(SettingsRobolectricTestRunner.class)
|
@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 {
|
public class DevicePickerFragmentTest {
|
||||||
@Mock
|
@Mock
|
||||||
private LocalBluetoothAdapter mLocalAdapter;
|
private LocalBluetoothAdapter mLocalAdapter;
|
||||||
|
@@ -56,7 +56,7 @@ import java.util.ArrayList;
|
|||||||
|
|
||||||
|
|
||||||
@RunWith(SettingsRobolectricTestRunner.class)
|
@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
|
ShadowEventLogWriter.class
|
||||||
})
|
})
|
||||||
public class DeviceProfilesSettingsTest {
|
public class DeviceProfilesSettingsTest {
|
||||||
|
@@ -46,7 +46,7 @@ import org.robolectric.annotation.Config;
|
|||||||
import org.robolectric.shadows.ShadowDialog;
|
import org.robolectric.shadows.ShadowDialog;
|
||||||
|
|
||||||
@RunWith(SettingsRobolectricTestRunner.class)
|
@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 {
|
public class ForgetDeviceDialogFragmentTest {
|
||||||
|
|
||||||
@Mock(answer = Answers.RETURNS_DEEP_STUBS)
|
@Mock(answer = Answers.RETURNS_DEEP_STUBS)
|
||||||
|
@@ -50,7 +50,7 @@ import org.robolectric.shadows.ShadowDialog;
|
|||||||
import org.robolectric.util.FragmentTestUtil;
|
import org.robolectric.util.FragmentTestUtil;
|
||||||
|
|
||||||
@RunWith(SettingsRobolectricTestRunner.class)
|
@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 {
|
public class RemoteDeviceNameDialogFragmentTest {
|
||||||
|
|
||||||
@Mock(answer = Answers.RETURNS_DEEP_STUBS)
|
@Mock(answer = Answers.RETURNS_DEEP_STUBS)
|
||||||
|
@@ -41,7 +41,7 @@ import static org.mockito.Mockito.verify;
|
|||||||
import static org.mockito.Mockito.when;
|
import static org.mockito.Mockito.when;
|
||||||
|
|
||||||
@RunWith(SettingsRobolectricTestRunner.class)
|
@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)
|
shadows = SettingsShadowResources.class)
|
||||||
public class UtilsTest {
|
public class UtilsTest {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user