开发者

What's the usage of Easymock.and(int, int)?

开发者 https://www.devze.com 2023-01-28 00:40 出处:网络
EasyMock has predefined argument matcher and(X first, X second) Document says: Matches if the matchers used in fir开发者_如何转开发st and second both match. Available for all primitive types and f

EasyMock has predefined argument matcher and(X first, X second)

Document says:

Matches if the matchers used in fir开发者_如何转开发st and second both match. Available for all primitive types and for objects.

But I don't understand what's the use case for the numberical type and matcher. For example, and(int first, int second), it's meaningless if first not equals to second, how can an integer equals both first and second while first and second are different value?


The point is to use other matchers inside the and. Like and(lt(8), gt(4))

0

精彩评论

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