public void testSearchablesListReal(){
  MyMockPackageManager mockPM=new MyMockPackageManager(mContext.getPackageManager());
  MyMockContext mockContext=new MyMockContext(mContext,mockPM);
  mockPM.setSearchablesMode(MyMockPackageManager.SEARCHABLES_PASSTHROUGH);
  Searchables searchables=new Searchables(mockContext,0);
  searchables.buildSearchableList();
  ArrayList<SearchableInfo> searchablesList=searchables.getSearchablesList();
  int count=searchablesList.size();
  assertTrue(count >= 1);
  checkSearchables(searchablesList);
  ArrayList<SearchableInfo> global=searchables.getSearchablesInGlobalSearchList();
  checkSearchables(global);
}

public void testSearchablesListReal ( ) { MyMockPackageManager mockPM = new MyMockPackageManager ( mContext . getPackageManager ( ) ) ; MyMockContext mockContext = new MyMockContext ( mContext , mockPM ) ; mockPM . setSearchablesMode ( MyMockPackageManager . SEARCHABLES_PASSTHROUGH ) ; Searchables searchables = new Searchables ( mockContext , 0 ) ; searchables . buildSearchableList ( ) ; ArrayList < SearchableInfo > searchablesList = searchables . getSearchablesList ( ) ; int count = searchablesList . size ( ) ; assertTrue ( count >= 1 ) ; checkSearchables ( searchablesList ) ; ArrayList < SearchableInfo > global = searchables . getSearchablesInGlobalSearchList ( ) ; checkSearchables ( global ) ; }
this is an attempt to run the searchable info list with a mocked context . here are some things i ' d like to test . confirm ok with " zero " searchables confirm " good " metadata read properly confirm " bad " metadata skipped properly confirm ordering of searchables confirm " good " actionkeys confirm " bad " actionkeys are rejected confirm xml ordering enforced ( will fail today - bug in searchableinfo ) findactionkey works geticon works
