版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/PeersLee/article/details/86525090
@RunWith(PowerMockRunner.class)
@PrepareForTest({xx.class})
mockStatic(xx.class);
doSomething();
verifyStatic(xx.class, times(1));
xx.xxx(any());
@RunWith(PowerMockRunner.class)
@PrepareForTest({xx.class})
mockStatic(xx.class);
doSomething();
verifyStatic(xx.class, times(1));
xx.xxx(any());