func testExample() {
let expectation = expectationWithDescription("GET \(URL)") let webAPI: WebAPI()

// 非同步
webAPI.invoke() { (model) -> Void in



expectation.fulfill()
}
waitForExpectationsWithTimeout(task.originalRequest!.timeoutInterval) { error in if let error = error { print("Error: \(error.localizedDescription)") } }

}

 

參考資料:

http://nshipster.com/xctestcase/

arrow
arrow
    全站熱搜

    小賢 發表在 痞客邦 留言(0) 人氣()