Skip to content

Instantly share code, notes, and snippets.

@pangers
Created August 8, 2015 00:33
Show Gist options
  • Save pangers/04dc301595fb5f3396e2 to your computer and use it in GitHub Desktop.
Save pangers/04dc301595fb5f3396e2 to your computer and use it in GitHub Desktop.
class AsynchronousTesting: XCTestCase {
var clientManager: APIManager!
func setUp() {
clientManager = APIManager()
}
func testLongOperationWrongly() {
var users: [Users] = []
clientManager.getListOfUsers { incomingUsers, error in
if error == nil {
users = incomingUsers
}
}
XCTAssert(users.count > 0, "Users returned should always be greater than zero")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment