![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PowerMock
文章平均质量分 68
joyyq
这个作者很懒,什么都没留下…
展开
-
Mocking private methods
Quick summary Use the @RunWith(PowerMockRunner.class) annotation at the class-level of the test case.Use the @PrepareForTest(ClassWithPrivateMethod.class) annotation at the class-level of the tes转载 2012-07-21 21:48:05 · 588 阅读 · 0 评论 -
Use junit test private method
The class contain private method need to be test. public class TestPrivateMethod { private int add(int a, int b) { return a+b; } } The junit for private method test. public class TestPri转载 2012-07-21 21:43:28 · 524 阅读 · 0 评论