iOS单元测试和UI测试全面解析(12)
发表于:2017-03-31来源:51CTO作者:朱先忠点击数:
标签:单元测试iOS
//异步测试时:成功测试很快,失败测试却比较慢 functestValidCallToiTunesGetsHTTPStatusCode200(){ //given leturl=URL(string: https://itunes.apple.com/search?media=musicentity=songter
-
//异步测试时:成功测试很快,失败测试却比较慢
-
func testValidCallToiTunesGetsHTTPStatusCode200() {
-
// given
-
let url = URL(string: "https://itunes.apple.com/search?media=music&entity=song&term=abba")
-
// 1
-
let promise = expectation(description: "Status code: 200")
-
-
// when
-
原文转自:http://mobile.51cto.com/iphone-535758.htm