我很难找到设置类的静态字段的方法.它基本上是这样的:
public class Foo{ // ... private static B b = null; }
其中B是另一个类.
有什么方法可以在PowerMock中执行此操作而不是使用setInternalStateFromContext()?使用上下文类方法对于设置一个字段似乎有点过分.
setInternalStateFromContext()
谢谢.
junit static mocking powermock
junit ×1
mocking ×1
powermock ×1
static ×1