Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cbess/cbasynctestcase
ObjC Easy Asynchronous Unit Test Case - Synchronize those async operations for testing purposes
https://github.com/cbess/cbasynctestcase
Last synced: about 1 month ago
JSON representation
ObjC Easy Asynchronous Unit Test Case - Synchronize those async operations for testing purposes
- Host: GitHub
- URL: https://github.com/cbess/cbasynctestcase
- Owner: cbess
- Created: 2013-06-30T03:26:40.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-06-30T03:40:20.000Z (over 11 years ago)
- Last Synced: 2024-04-14T15:44:19.376Z (7 months ago)
- Language: Objective-C
- Homepage:
- Size: 109 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
CBAsyncTestCase
===============Asynchronous Unit Test Case - Synchronize those async operations for testing purposes.
#### Example Usage
```objc
- (void)testNetworkStuff
{
[self beginAsyncOperation];
NSString *identifier = @"777";
[_networkManager fetchStuffWithID:identifier completion:^(NSArray *results, NSError *error) {
STAssertNil(error, @"error occurred: %@", error);
STAssertTrue(results.count, @"no results");
[self finishedAsyncOperation];
}];
// waits for async operation or timeout and fail assertion
[self assertAsyncOperationTimeout];
}
```