@Test public void displayWarningForMissingActivities_withAllActivitiesDeclared_shouldNotShowLogOrToast() throws Exception { Robolectric.packageManager.addResolveInfoForIntent(new Intent(context, MoPubActivity.class), mockResolveInfo); Robolectric.packageManager.addResolveInfoForIntent(new Intent(context, MraidActivity.class), mockResolveInfo); Robolectric.packageManager.addResolveInfoForIntent(new Intent(context, MraidVideoPlayerActivity.class), mockResolveInfo); Robolectric.packageManager.addResolveInfoForIntent(new Intent(context, MoPubBrowser.class), mockResolveInfo); ShadowLog.setupLogging(); setDebugMode(true); ManifestUtils.displayWarningForMissingActivities(context, requiredWebViewSdkActivities); assertThat(ShadowToast.getLatestToast()).isNull(); assertThat(ShadowLog.getLogs()).isEmpty(); }
@VisibleForTesting static void displayWarningForMissingActivities(@NonNull final Context context, @NonNull final List<Class<? extends Activity>> requiredActivities) { final List<Class<? extends Activity>> undeclaredActivities = filterDeclaredActivities(context, requiredActivities, false); if (undeclaredActivities.isEmpty()) { return; } logWarningToast(context); logMissingActivities(undeclaredActivities); }
ManifestUtils { @VisibleForTesting static void displayWarningForMissingActivities(@NonNull final Context context, @NonNull final List<Class<? extends Activity>> requiredActivities) { final List<Class<? extends Activity>> undeclaredActivities = filterDeclaredActivities(context, requiredActivities, false); if (undeclaredActivities.isEmpty()) { return; } logWarningToast(context); logMissingActivities(undeclaredActivities); } }
ManifestUtils { @VisibleForTesting static void displayWarningForMissingActivities(@NonNull final Context context, @NonNull final List<Class<? extends Activity>> requiredActivities) { final List<Class<? extends Activity>> undeclaredActivities = filterDeclaredActivities(context, requiredActivities, false); if (undeclaredActivities.isEmpty()) { return; } logWarningToast(context); logMissingActivities(undeclaredActivities); } private  ManifestUtils(); }
ManifestUtils { @VisibleForTesting static void displayWarningForMissingActivities(@NonNull final Context context, @NonNull final List<Class<? extends Activity>> requiredActivities) { final List<Class<? extends Activity>> undeclaredActivities = filterDeclaredActivities(context, requiredActivities, false); if (undeclaredActivities.isEmpty()) { return; } logWarningToast(context); logMissingActivities(undeclaredActivities); } private  ManifestUtils(); static void checkWebViewActivitiesDeclared(@NonNull final Context context); static void checkNativeActivitiesDeclared(@NonNull final Context context); static boolean isDebuggable(@NonNull final Context context); }
ManifestUtils { @VisibleForTesting static void displayWarningForMissingActivities(@NonNull final Context context, @NonNull final List<Class<? extends Activity>> requiredActivities) { final List<Class<? extends Activity>> undeclaredActivities = filterDeclaredActivities(context, requiredActivities, false); if (undeclaredActivities.isEmpty()) { return; } logWarningToast(context); logMissingActivities(undeclaredActivities); } private  ManifestUtils(); static void checkWebViewActivitiesDeclared(@NonNull final Context context); static void checkNativeActivitiesDeclared(@NonNull final Context context); static boolean isDebuggable(@NonNull final Context context);  }