如何在Powermockito中测试静态块

问题描述

这是我的考试班:

true

这是我的测试课:

class A {
    static HashSet set = new HashSet();
    static {
        set.put(1);
        set.put(2);
    }

    public boolean getConfig(int num){
        return set.contains(num);
    }
}

所以我的问题是如何在powermockito中初始化静态块?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)