Merge "Purify SettingsActivity from old search code."

This commit is contained in:
TreeHugger Robot
2017-03-16 23:01:44 +00:00
committed by Android (Google) Code Review
11 changed files with 8 additions and 1048 deletions

View File

@@ -30,7 +30,6 @@ import org.mockito.MockitoAnnotations;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.annotation.Config;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyInt;
import static org.mockito.Mockito.doReturn;
@@ -59,20 +58,6 @@ public class SettingsActivityTest {
doReturn(mBitmap).when(mActivity).getBitmapFromXmlResource(anyInt());
}
@Test
public void testQueryTextChange_shouldUpdate() {
final String testQuery = "abc";
assertThat(mActivity.mSearchQuery).isNull();
try {
mActivity.onQueryTextChange(testQuery);
} catch (NullPointerException e) {
// Expected, because searchFeatureProvider is not wired up.
}
assertThat(mActivity.mSearchQuery).isEqualTo(testQuery);
}
@Test
public void launchSettingFragment_nullExtraShowFragment_shouldNotCrash()
throws ClassNotFoundException {