v3.0.0
Version 3.0.0
21 Dec 2015
Compatibility-breaking Changes:
- The semantics for repeated verification have changed. Call counts used to always accumulate:
…something that invokes someMethod…
[verifyCount(myMock, times(1)) someMethod];
…another thing that invokes someMethod…
[verifyCount(myMock, times(2)) someMethod];
But now, verification counts only the matches since the last verification.
- OCMockito now requires OCHamcrest v5.1.0 or higher, which also potentially breaks compatibility.
Features:
- Instead of enabling short syntax by defining MOCKITO_SHORTHAND, short syntax is now enabled by
default. To disable it, #define MKT_DISABLE_SHORT_SYNTAX. - Previously verified invocations are no longer considered for verification.
- Report additional information about verification failures:
- If the number of matches is incorrect, report a filtered call stack of the first bad invocation
or the last good invocation. - If there were no matches, but there was a call to the expected method, report it. Describe the
mismatched arguments along with a filtered call stack. - If there were no matches, but there were other calls to the mock, report them with call stacks.
- If there were no matches, and in fact that mock received no calls, say so.
- If the number of matches is incorrect, report a filtered call stack of the first bad invocation
Fixes:
- Fixed
atMost(0)
Deleted:
MKTCapturingMatcher
(deprecated in 2.0.1)