Skip to content

Instantly share code, notes, and snippets.

@andreafrancia
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreafrancia/9551500 to your computer and use it in GitHub Desktop.
Save andreafrancia/9551500 to your computer and use it in GitHub Desktop.
Objective-C API for mock library inspired to Python Voidspace library
- (void)testMockery
{
Mockery * mockery = [[Mockery alloc]init];
id<AddressSink> sink = [mockery mockWithName:@"sink"];
[sink findAddressWithUUID:@"123"];
XCTAssertEqualObjects([mockery calls:^{
[sink findAddressWithUUID:@"123"];
}], [mockery trackedCalls:sink]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment