@Test public void testIsLocalUrl() { String url = "http: assertFalse(Utils.isLocalUrl(url)); url = ""; assertFalse(Utils.isLocalUrl(url)); url = "content: assertTrue(Utils.isLocalUrl(url)); url = "content:"; assertFalse(Utils.isLocalUrl(url)); }
public static boolean isLocalUrl(String url) { return url.startsWith("content: }
Utils { public static boolean isLocalUrl(String url) { return url.startsWith("content: } }
Utils { public static boolean isLocalUrl(String url) { return url.startsWith("content: }  }
Utils { public static boolean isLocalUrl(String url) { return url.startsWith("content: }  static String tokenToAuthString(String token); static void showToast(Context context, String errorMessage); static SharedPreferences.Editor getSharedPrefEditor(Context context); static SharedPreferences getSharedPref(Context context); static void logout(Context context); static Uri getNewImageUri(Context context); static boolean isLocalUrl(String url); static boolean isClose(double a, double b); static boolean objectEquals(Object a, Object b); static double roundToDecimals(double num, int precision); static boolean isValidYear(String s); static String yearString(int year); }
Utils { public static boolean isLocalUrl(String url) { return url.startsWith("content: }  static String tokenToAuthString(String token); static void showToast(Context context, String errorMessage); static SharedPreferences.Editor getSharedPrefEditor(Context context); static SharedPreferences getSharedPref(Context context); static void logout(Context context); static Uri getNewImageUri(Context context); static boolean isLocalUrl(String url); static boolean isClose(double a, double b); static boolean objectEquals(Object a, Object b); static double roundToDecimals(double num, int precision); static boolean isValidYear(String s); static String yearString(int year);  }