Code example for PackageManager

Methods: getActivityInfo

0
        PackageManager pm = mContext.getPackageManager();
        ComponentName component = intent.getComponent();
 
        assertNotNull(component);
 
        ActivityInfo activityInfo = pm.getActivityInfo(component, 0);
 
        // Robolectric doesn't implements PackageManager.getActivityInfo() 
        assertNull(activityInfo);
    } 
 
    @Test 
    public void shouldLaunchActivity() { 
        Activity activity = launchActivity(TEST_PACKAGE_NAME, MainActivity.class, null);
        assertNotNull(activity);
    } 
 
    @Test(expected = Expected.class) 
    public void shouldRunTestOnUiThread() throws Throwable { 
        runTestOnUiThread(new Runnable() {
            @Override