2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-22 18:07:55 +00:00
Albert Vaca Cintora c6dbadce21
Upgrade to Mockito 5, remove PowerMock and update test
PowerMock is no longer maintained and is only compatible with Mockito 3.
However, modern Mockito supports mocking static methods, so PowerMock is
no longer needed (after adjusting the tests a bit).
2024-05-13 12:31:59 +02:00

30 lines
816 B
Java

package android.util;
// Based on https://stackoverflow.com/questions/36787449/how-to-mock-method-e-in-log
public class Log {
public static int d(String tag, String msg) {
System.out.println("DEBUG: " + tag + ": " + msg);
return 0;
}
public static int i(String tag, String msg) {
System.out.println("INFO: " + tag + ": " + msg);
return 0;
}
public static int w(String tag, String msg) {
System.out.println("WARN: " + tag + ": " + msg);
return 0;
}
public static int e(String tag, String msg) {
System.out.println("ERROR: " + tag + ": " + msg);
return 0;
}
public static int e(String tag, String msg, Throwable e) {
System.out.println("ERROR: " + tag + ": " + msg + ": " + e);
return 0;
}
}