Home
last modified time | relevance | path

Searched refs:MockSource (Results 1 – 16 of 16) sorted by relevance

/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/
DMockSource.java33 public class MockSource implements Source { class
35 public static final MockSource SOURCE_1 = new MockSource("SOURCE_1");
37 public static final MockSource SOURCE_2 = new MockSource("SOURCE_2");
39 public static final MockSource SOURCE_3 = new MockSource("SOURCE_3");
41 public static final MockSource WEB_SOURCE = new MockSource("WEB") {
60 public MockSource(String name) { in MockSource() method in MockSource
64 public MockSource(String name, int versionCode) { in MockSource() method in MockSource
157 MockSource s = (MockSource) o; in equals()
180 return MockSource.this; in getSource()
DSearchableCorporaTest.java37 private static final MockCorpus CORPUS_1 = new MockCorpus(MockSource.SOURCE_1);
38 private static final MockCorpus CORPUS_DISABLED = new MockCorpus(MockSource.SOURCE_2);
39 private static final MockCorpus CORPUS_NOT_IN_ALL = new MockCorpus(MockSource.SOURCE_3) {
45 private static final MockCorpus CORPUS_WEB = new MockCorpus(MockSource.WEB_SOURCE);
58 sources.addSource(MockSource.SOURCE_1); in setUp()
59 sources.addSource(MockSource.SOURCE_2); in setUp()
60 sources.addSource(MockSource.SOURCE_3); in setUp()
61 sources.addSource(MockSource.WEB_SOURCE); in setUp()
86 assertEquals(CORPUS_1, mCorpora.getCorpusForSource(MockSource.SOURCE_1)); in testGetCorpusForSource()
87 assertNull(mCorpora.getCorpusForSource(new MockSource("foo"))); in testGetCorpusForSource()
DMultiSourceCorpusTest.java47 MockSource.SOURCE_1, MockSource.SOURCE_2); in setUp()
52 MockSource.SOURCE_1, MockSource.SOURCE_2); in testGetSources()
57 MockSource.SOURCE_1.getSuggestions("foo", 50, false), in testGetSuggestions()
58 MockSource.SOURCE_2.getSuggestions("foo", 50, false)); in testGetSuggestions()
DResultPromoterTest.java55 mS11 = MockSource.SOURCE_1.createSuggestion(mQuery + "_1_1"); in setUp()
56 mS12 = MockSource.SOURCE_1.createSuggestion(mQuery + "_1_2"); in setUp()
57 mS21 = MockSource.SOURCE_2.createSuggestion(mQuery + "_1_1"); in setUp()
58 mS22 = MockSource.SOURCE_2.createSuggestion(mQuery + "_1_2"); in setUp()
59 mWeb1 = MockSource.WEB_SOURCE.createSuggestion(mQuery + "_web_1"); in setUp()
60 mWeb2 = MockSource.WEB_SOURCE.createSuggestion(mQuery + "_web_2"); in setUp()
DWebPromoterTest.java56 mS11 = MockSource.SOURCE_1.createSuggestion(mQuery + "_1_1"); in setUp()
57 mS12 = MockSource.SOURCE_1.createSuggestion(mQuery + "_1_2"); in setUp()
58 mS21 = MockSource.SOURCE_2.createSuggestion(mQuery + "_1_1"); in setUp()
59 mS22 = MockSource.SOURCE_2.createSuggestion(mQuery + "_1_2"); in setUp()
60 mWeb1 = MockSource.WEB_SOURCE.createSuggestion(mQuery + "_web_1"); in setUp()
61 mWeb2 = MockSource.WEB_SOURCE.createSuggestion(mQuery + "_web_2"); in setUp()
DShortcutRepositoryTest.java54 static final Source APP_SOURCE = new MockSource("com.example.app/.App");
56 static final Source APP_SOURCE_V2 = new MockSource("com.example.app/.App", 2);
58 static final Source CONTACTS_SOURCE = new MockSource("com.android.contacts/.Contacts");
60 static final Source BOOKMARKS_SOURCE = new MockSource("com.android.browser/.Bookmarks");
62 static final Source HISTORY_SOURCE = new MockSource("com.android.browser/.History");
64 static final Source MUSIC_SOURCE = new MockSource("com.android.music/.Music");
66 static final Source MARKET_SOURCE = new MockSource("com.android.vending/.Market");
72 static final Corpus WEB_CORPUS = new MockCorpus(MockSource.WEB_SOURCE);
134 mWeb1 = new SuggestionData(MockSource.WEB_SOURCE) in setUp()
727 MockCorpus newCorpus = new MockCorpus(new MockSource("newsource")); in testIrrelevantAppUpgrade()
DBlendingPromoterTest.java42 mS11 = MockSource.SOURCE_1.createSuggestion(mQuery + "_1_1"); in setUp()
43 mS12 = MockSource.SOURCE_1.createSuggestion(mQuery + "_1_2"); in setUp()
44 mS21 = MockSource.SOURCE_2.createSuggestion(mQuery + "_1_1"); in setUp()
45 mS22 = MockSource.SOURCE_2.createSuggestion(mQuery + "_1_2"); in setUp()
46 mWeb1 = MockSource.WEB_SOURCE.createSuggestion(mQuery + "_web_1"); in setUp()
47 mWeb2 = MockSource.WEB_SOURCE.createSuggestion(mQuery + "_web_2"); in setUp()
DMockCorpus.java33 public static final Corpus CORPUS_1 = new MockCorpus(MockSource.SOURCE_1);
35 public static final Corpus CORPUS_2 = new MockCorpus(MockSource.SOURCE_2);
37 public static final Corpus WEB_CORPUS = new MockCorpus(MockSource.WEB_SOURCE);
133 return mSource.getName().equals(MockSource.WEB_SOURCE.getName()); in isWebCorpus()
DMockShortcutRepository.java57 cursor.add(MockSource.SOURCE_1.createSuggestion(query + "_1_shortcut")); in getShortcutsForQuery()
58 cursor.add(MockSource.SOURCE_2.createSuggestion(query + "_2_shortcut")); in getShortcutsForQuery()
DSingleCorpusPromoterTest.java48 Source[] expectedSource = { MockSource.SOURCE_1, MockSource.SOURCE_1 }; in testPromotesOnlyGivenCorpus()
DShouldQueryStrategyTest.java44 public static final Corpus CORPUS_1 = new MockCorpus(MockSource.SOURCE_1) {
51 public static final Corpus CORPUS_2 = new MockCorpus(MockSource.SOURCE_2) {
DRankAwarePromoterTest.java134 Source mockSource = new MockSource("Source" + i); in createMockCorpora()
142 Source mockSource = new MockSource("Shortcuts"); in createMockShortcutsCorpus()
DSuggestionCursorWithExtrasTest.java135 MockSource.SOURCE_1, "", expectedCursor); in createCursorWithExtras()
154 MockSource.SOURCE_1, "", cursor); in checkSuggestionCursorExtraColumnValue()
DSourceShortcutRefresherTest.java114 private class MockRefreshSource extends MockSource {
/packages/apps/Gallery2/tests/src/com/android/gallery3d/data/
DMockSource.java21 class MockSource extends MediaSource { class
28 public MockSource(GalleryApp context) { in MockSource() method in MockSource
DMediaSetTest.java35 dataManager.addSource(new MockSource(app)); in testComboAlbumSet()