i want to test static method in class with mockito iam begainer in android testing iam adding mockito dependancy
public class UrlHelper {
private static String TAG = UrlHelper.class.getSimpleName();
protected static String buildURL(String url, boolean isRelativeUrl) {
String requestUrl = "";
if (url != null && !url.isEmpty()) {
Log.d(TAG, "url is not null or empty");
requestUrl = url;
}
if (isRelativeUrl) {
Log.d(TAG, "url is relative url");
requestUrl = Constants.BASE_URL + url;
}
return requestUrl;
}
}
Aucun commentaire:
Enregistrer un commentaire