Skip to content

Commit

Permalink
Fixes post rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
julianrex committed May 17, 2021
1 parent 0684a15 commit a8f7973
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Sources/MapboxMaps/Foundation/MapView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ open class MapView: UIView {
ornaments = OrnamentsManager(view: self, options: OrnamentOptions())

// Initialize/Configure location manager
location = LocationManager(locationSupportableMapView: self)
location = LocationManager(locationSupportableMapView: self, style: style)

// Initialize/Configure annotations manager
annotations = AnnotationManager(for: self, mapEventsObservable: mapboxMap, with: style)
Expand Down
19 changes: 10 additions & 9 deletions Tests/MapboxMapsTests/Location/LocationManagerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,17 @@ internal class LocationManagerTests: XCTestCase {
func testLocationManagerDefaultInitialization() {
let locationOptions = LocationOptions()

let locationManager = LocationManager(locationSupportableMapView: locationSupportableMapView, style: locationSupportableStyle)
let locationManager = LocationManager(locationSupportableMapView: locationSupportableMapView,
style: locationSupportableStyle)

XCTAssertEqual(locationManager.options, locationOptions)
XCTAssertTrue(locationManager.locationSupportableMapView === locationSupportableMapView)
XCTAssertNil(locationManager.delegate)
}

func testAddLocationConsumer() {
let locationManager = LocationManager(locationSupportableMapView: locationSupportableMapView, style: locationSupportableStyle)
let locationManager = LocationManager(locationSupportableMapView: locationSupportableMapView,
style: locationSupportableStyle)
let locationConsumer = LocationConsumerMock()

locationManager.addLocationConsumer(newConsumer: locationConsumer)
Expand All @@ -46,11 +48,8 @@ internal class LocationManagerTests: XCTestCase {
func testUpdateLocationOptionsWithModifiedPuckType() {
var locationOptions = LocationOptions()
locationOptions.puckType = .puck2D(Puck2DConfiguration(scale: .constant(1.0)))
let locationManager = LocationManager(
locationOptions: locationOptions,
locationSupportableMapView: locationSupportableMapView,
style: locationSupportableStyle)
let locationManager = LocationManager(locationSupportableMapView: locationSupportableMapView, style: locationSupportableStyle)
let locationManager = LocationManager(locationSupportableMapView: locationSupportableMapView,
style: locationSupportableStyle)

var locationOptions2 = LocationOptions()
locationOptions2.puckType = .puck2D(Puck2DConfiguration(scale: .constant(2.0)))
Expand All @@ -63,7 +62,8 @@ internal class LocationManagerTests: XCTestCase {
func testUpdateLocationOptionsWithPuckTypeSetToNil() {
var locationOptions = LocationOptions()
locationOptions.puckType = .puck2D()
let locationManager = LocationManager(locationSupportableMapView: locationSupportableMapView, style: locationSupportableStyle)
let locationManager = LocationManager(locationSupportableMapView: locationSupportableMapView,
style: locationSupportableStyle)

var locationOptions2 = LocationOptions()
locationOptions2.puckType = nil
Expand All @@ -76,7 +76,8 @@ internal class LocationManagerTests: XCTestCase {
func testUpdateLocationOptionsWithPuckTypeSetToNonNil() {
var locationOptions = LocationOptions()
locationOptions.puckType = nil
let locationManager = LocationManager(locationSupportableMapView: locationSupportableMapView, style: locationSupportableStyle)
let locationManager = LocationManager(locationSupportableMapView: locationSupportableMapView,
style: locationSupportableStyle)

var locationOptions2 = LocationOptions()
locationOptions2.puckType = .puck2D()
Expand Down

0 comments on commit a8f7973

Please sign in to comment.