You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
XCTAssertEqual(placemarks?.count,5,"forward geocode should have 5 results")
28
28
addressPlacemark = placemarks![0]
29
29
30
30
expectation.fulfill()
31
31
}
32
+
XCTAssertNotNil(task)
32
33
33
34
waitForExpectationsWithTimeout(1){(error)in
34
35
XCTAssertNil(error,"Error: \(error)")
35
-
XCTAssertFalse(geocoder.geocoding)
36
+
XCTAssertEqual(task?.state,.Completed)
36
37
}
37
38
38
39
XCTAssertEqual(addressPlacemark.description,"Pennsylvania Ave, Stellarton, Nova Scotia B0K 1S0, Canada","forward geocode should populate description")
@@ -63,14 +64,15 @@ class ForwardGeocodingTests: XCTestCase {
63
64
64
65
letexpection=expectationWithDescription("forward geocode execute completion handler for invalid query")
65
66
letgeocoder=MBGeocoder(accessToken: BogusToken)
66
-
geocoder.geocodeAddressString("Sandy Island, New Caledonia", withAllowedScopes:[.AdministrativeArea,.Place,.Locality,.PointOfInterest], inCountries:["FR"]){(placemarks, error)in
67
+
lettask=geocoder.geocodeAddressString("Sandy Island, New Caledonia", withAllowedScopes:[.AdministrativeArea,.Place,.Locality,.PointOfInterest], inCountries:["FR"]){(placemarks, error)in
67
68
XCTAssertEqual(placemarks?.count,0,"forward geocode should return no results for invalid query")
0 commit comments