Junit Parameterized tests together with Powermock - how?

后端 未结 4 1767
小鲜肉
小鲜肉 2020-12-29 01:19

I\'ve been trying to figure out how to run parameterized tests in Junit4 together with PowerMock. The problem is that to use PowerMock you need to decorate your test class w

4条回答
  •  难免孤独
    2020-12-29 01:55

    I had the same issue. Unfortunately it would not let me use a PowerMock Rule due to the JVM I had. Instead of the rule I used RunnerDelegate.

    @RunWith(PowerMockRunner.class)
    @PowerMockRunnerDelegate(Parameterized.class)
    

提交回复
热议问题