java如何在PowerMockito中使用WhiteBox模拟方法
用powermockito模拟“测试”方法,我能用powermockito中的WhiteBox做同样的事情吗
WhiteBox中有没有API可以做类似的事情
public class MTest {
@Before
public void setUp() throws Exception {
PowerMockito.whenNew(MCfg.class).withNoArguments().thenReturn(tCfg);
doNothing().when(tCfg).test();
}
}
-谢谢
共 (0) 个答案