0.77版本静态方法mock不了
Juwairen2021 opened this issue · 0 comments
Juwairen2021 commented
其它mock都正常,唯独静态方法mock不了。
麻烦帮看看,谢谢。
[VERBOSE] Mock method "getDefaultPictureUrl" as "com.xxx.yyy.common.utils.PlatformUtils::getDefaultPictureUrl() : java.lang.String"
at com.xxx.yyy.common.dictionary.cache.ConfigManager.<clinit>(ConfigManager.java:19)
at com.xxx.yyy.common.utils.PlatformUtils.getDefaultPictureUrl(PlatformUtils.java:615)
public class PlatformUtils {
public static String getDefaultPictureUrl() {
ConfigManager cm = ConfigManager.getInstance();
......
@MockInvoke(targetClass = PlatformUtils.class)
private String getDefaultPictureUrl(){
return "http://www.picurl";
}