开发者

mockito: how to verify calls on real implementation?

开发者 https://www.devze.com 2023-03-07 17:17 出处:网络
I\'d like to verify calls to a logger object, so that the real implementation is still called (so I can see the output during tests).

I'd like to verify calls to a logger object, so that the real implementation is still called (so I can see the output during tests).

Something like 开发者_开发百科

verify(logger).error(anyString())


you need to use spy to verify invocations on real objects.

0

精彩评论

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

关注公众号