-
Notifications
You must be signed in to change notification settings - Fork 100
OCHamcrest FAQ
Jon Reid edited this page Jul 4, 2015
·
12 revisions
OCHamcrest is compatible with the following testing frameworks:
- XCTest
- OCUnit (SenTestingKit)
- Kiwi
- GHUnit
- Google Toolbox for Mac (GTM)
- OCMock
- OCMockito
Use withMatcher:forArgument:
to specify matchers for specific arguments. Those matchers will take precedence over what is specified later. For example:
[[verify(mockObject) withMatcher:anything() forArgument:1]
someMethod:arg someRect:CGRectZero];
Here, the matcher for the CGRect has already been specified as anything()
. The value of CGRectZero
is ignored, but some rect is necessary to create the right method signature.