开发者

Unit testing with TwiP ant Powermock

开发者 https://www.devze.com 2023-01-31 23:46 出处:网络
In my unit tests, I use both TwiP and PowerMock. Both are great tools, but both require the test to be run with their own runner, su开发者_如何学Goch as this:

In my unit tests, I use both TwiP and PowerMock. Both are great tools, but both require the test to be run with their own runner, su开发者_如何学Goch as this:

@RunWith(PowerMockRunner.class) 
public class MyTest {
…
}

Is it possible – and if so, how – to combine the two? Perhaps by creating a custom runner or something along the lines.


Yes this is possible, check out the PowerMock rule.

0

精彩评论

暂无评论...
验证码 换一张
取 消