diff options
Diffstat (limited to 'platform/ios/Integration Tests/MGLSourceTests.swift')
-rw-r--r-- | platform/ios/Integration Tests/MGLSourceTests.swift | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/platform/ios/Integration Tests/MGLSourceTests.swift b/platform/ios/Integration Tests/MGLSourceTests.swift deleted file mode 100644 index 69fa0182b5..0000000000 --- a/platform/ios/Integration Tests/MGLSourceTests.swift +++ /dev/null @@ -1,45 +0,0 @@ -import XCTest - -class MGLSourceTests: MGLMapViewIntegrationTest { - - // See testForRaisingExceptionsOnStaleStyleObjects for Obj-C sibling. - func testForRaisingExceptionsOnStaleStyleObjectsOnRemoveFromMapView() { - - guard - let configURL = URL(string: "mapbox://examples.2uf7qges") else { - XCTFail() - return - } - - let source = MGLVectorTileSource(identifier: "trees", configurationURL: configURL) - mapView.style?.addSource(source) - - let bundle = Bundle(for: type(of: self)) - - guard let styleURL = bundle.url(forResource: "one-liner", withExtension: "json") else { - XCTFail() - return - } - - styleLoadingExpectation = nil; - - mapView.centerCoordinate = CLLocationCoordinate2D(latitude : 38.897, longitude : -77.039) - mapView.zoomLevel = 10.5 - mapView.styleURL = styleURL - - waitForMapViewToFinishLoadingStyle(withTimeout: 10.0) - - let expect = expectation(description: "Remove source should error") - - do { - try mapView.style?.removeSource(source, error: ()) - } - catch let error as NSError { - XCTAssertEqual(error.domain, MGLErrorDomain) - XCTAssertEqual(error.code, MGLErrorCode.sourceCannotBeRemovedFromStyle.rawValue) - expect.fulfill() - } - - wait(for: [expect], timeout: 0.1) - } -} |