Created
April 22, 2017 19:04
-
-
Save chriswebb09/526c511b7faaa6c71f0bc32b8f894aa8 to your computer and use it in GitHub Desktop.
Testing code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func testDataStore() { | |
let dataSource = iTrackDataStore(searchTerm: "new") | |
let expect = expectation(description: "Data store calls APIClient to access server data and returns iTrack data array.") | |
dataSource.searchForTracks { tracks, error in | |
XCTAssert(tracks?.count == 49) | |
expect.fulfill() | |
} | |
waitForExpectations(timeout: 4) { error in | |
if let error = error { | |
XCTFail("waitForExpectationsWithTimeout errored: \(error)") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment