我正在为我的测试类使用PowerMockito和@PrepareForTest注释.当我这样做时,声纳说没有任何分支被覆盖.但是,我的其他不使用PowerMockito的测试类运行良好.例如:
@RunWith(PowerMockRunner.class)
@PrepareForTest({ MyClass.class })
public class MyClassTest {
//create some mocks and run some tests here
}
Run Code Online (Sandbox Code Playgroud)
是否有人遇到过同样的问题?
提前致谢.