Merge changes I868d1912,Id483ca41
* changes: Fix search test using location_settings Revert "Stop search tests using location_settings"
This commit is contained in:
@@ -39,6 +39,7 @@ import org.junit.Test;
|
|||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.robolectric.RobolectricTestRunner;
|
import org.robolectric.RobolectricTestRunner;
|
||||||
import org.robolectric.RuntimeEnvironment;
|
import org.robolectric.RuntimeEnvironment;
|
||||||
|
import org.robolectric.annotation.Config;
|
||||||
|
|
||||||
@RunWith(RobolectricTestRunner.class)
|
@RunWith(RobolectricTestRunner.class)
|
||||||
public class SearchIndexableResourcesTest {
|
public class SearchIndexableResourcesTest {
|
||||||
@@ -89,6 +90,7 @@ public class SearchIndexableResourcesTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@Config(qualifiers = "mcc999")
|
||||||
public void testNonIndexableKeys_GetsKeyFromProvider() {
|
public void testNonIndexableKeys_GetsKeyFromProvider() {
|
||||||
mSearchProvider.getSearchIndexableResources().getProviderValues().clear();
|
mSearchProvider.getSearchIndexableResources().getProviderValues().clear();
|
||||||
mSearchProvider.getSearchIndexableResources().addIndex(
|
mSearchProvider.getSearchIndexableResources().addIndex(
|
||||||
|
@@ -29,8 +29,14 @@ public class FakeIndexProvider implements Indexable {
|
|||||||
|
|
||||||
public static final String KEY = "TestKey";
|
public static final String KEY = "TestKey";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The fake SearchIndexProvider. Note that the use of location_settings below implies that tests
|
||||||
|
* using this should be using the res/xml-mcc999/location_settings.xml or
|
||||||
|
* res/xml-mcc998/location_settings.xml. Annotate tests with
|
||||||
|
* {@code @Config(qualifiers = "mcc999")}.
|
||||||
|
*/
|
||||||
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||||
new BaseSearchIndexProvider(R.xml.sound_settings) {
|
new BaseSearchIndexProvider(R.xml.location_settings) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> getNonIndexableKeys(Context context) {
|
public List<String> getNonIndexableKeys(Context context) {
|
||||||
|
Reference in New Issue
Block a user