Code example for Context

Methods: getString, assertNotEqual

0
        assertNotNull(si);
        assertEquals(thisActivity, si.getSearchActivity());
         
        Context appContext = si.getActivityContext(mContext);
        assertNotNull(appContext);
        MoreAsserts.assertNotEqual(appContext, mContext);
        assertEquals("Quick Search Box", appContext.getString(si.getHintId()));
        assertEquals("Quick Search Box", appContext.getString(si.getLabelId()));
    } 
     
    /** 
     * Test that non-searchable activities return no searchable info (this would typically 
     * trigger the use of the default searchable e.g. contacts) 
     */ 
    public void testNonSearchable() { 
        // test basic array & hashmap 
        Searchables searchables = new Searchables(mContext);
        searchables.buildSearchableList();
 
        // confirm that we return null for non-searchy activities 
        ComponentName nonActivity = new ComponentName(