Use external/robolectric-shadows/run_robotests.mk
This allows Settings to test against the latest framework changes. Also replaced TestConfig with traditional robolectric.properties. Bug: 73173204 Bug: 73892008 Test: make -j56 RunSettingsRoboTests Change-Id: I3135b4fa5f095ba79b282a76f45dd9baa2584bc7
This commit is contained in:
@@ -17,7 +17,6 @@ package com.android.settings.bluetooth;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import com.android.settings.TestConfig;
|
||||
import com.android.settings.testutils.SettingsRobolectricTestRunner;
|
||||
import com.android.settings.testutils.shadow.SettingsShadowBluetoothDevice;
|
||||
import com.android.settingslib.widget.FooterPreference;
|
||||
@@ -27,25 +26,24 @@ import org.junit.runner.RunWith;
|
||||
import org.robolectric.annotation.Config;
|
||||
|
||||
@RunWith(SettingsRobolectricTestRunner.class)
|
||||
@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION,
|
||||
shadows = SettingsShadowBluetoothDevice.class)
|
||||
@Config(shadows = SettingsShadowBluetoothDevice.class)
|
||||
public class BluetoothDetailsMacAddressControllerTest extends BluetoothDetailsControllerTestBase {
|
||||
|
||||
private BluetoothDetailsMacAddressController mController;
|
||||
private BluetoothDetailsMacAddressController mController;
|
||||
|
||||
@Override
|
||||
public void setUp() {
|
||||
super.setUp();
|
||||
mController = new BluetoothDetailsMacAddressController(mContext, mFragment, mCachedDevice,
|
||||
mLifecycle);
|
||||
setupDevice(mDeviceConfig);
|
||||
}
|
||||
@Override
|
||||
public void setUp() {
|
||||
super.setUp();
|
||||
mController =
|
||||
new BluetoothDetailsMacAddressController(mContext, mFragment, mCachedDevice, mLifecycle);
|
||||
setupDevice(mDeviceConfig);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void macAddress() {
|
||||
showScreen(mController);
|
||||
FooterPreference footer = (FooterPreference) mScreen.findPreference(
|
||||
mController.getPreferenceKey());
|
||||
assertThat(footer.getTitle().toString()).endsWith(mDeviceConfig.getAddress());
|
||||
}
|
||||
@Test
|
||||
public void macAddress() {
|
||||
showScreen(mController);
|
||||
FooterPreference footer =
|
||||
(FooterPreference) mScreen.findPreference(mController.getPreferenceKey());
|
||||
assertThat(footer.getTitle().toString()).endsWith(mDeviceConfig.getAddress());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user