mardi 7 avril 2015

In xcode, how can I get XCTest to wait for async calls in setUp before tests are run?

I'm writing integration tests in xcode 6 to go alongside my unit and functional tests. XCTest has a setUp() method that gets called before every test. Great! It also has XCTestException's which let me write async tests. Also great!


However, I would like to populate my test database with test data before every test and setUp just starts executing tests before the async database call is done.


Is there a way to have setUp wait until my database is ready before it runs tests?


Thanks!


Aucun commentaire:

Enregistrer un commentaire