Files
MapLibreParticleLab/platform/ios/Integration Tests/MGLMapViewIntegrationTest.h
Nadia Barbosa 7b243392e3 [ios] Add delegate method to specify the user location annotation’s position
Update method name

More API drafting

Add deprecation flag

Add Swift delegate integration test

Update method name and documentation

Update deprecation notices

Update method name

Offset anchor point relative to contentFrame

Update docs

Only run through switch statement if delegate is unimplemented

Account for content inset + refactor logic

Adjust edgePaddingForFollowing

Fix Swift delegate integration test

Set up integration test

Set up test location manager

.

Remove unused file reference from test

Return CGPoint value from delegate method within integration test setup

Test anchor points

Make updateUserLocationAnnotationView public

Refactor test

Update test location manager

Changelog entry

Doc fixes
2018-10-02 18:28:53 -04:00

36 lines
1.7 KiB
Objective-C

#import <XCTest/XCTest.h>
#import <Mapbox/Mapbox.h>
#import "MGLTestUtility.h"
#define MGLTestFail(myself, ...) \
_XCTPrimitiveFail(myself, __VA_ARGS__)
#define MGLTestAssert(myself, expression, ...) \
_XCTPrimitiveAssertTrue(myself, expression, @#expression, __VA_ARGS__)
#define MGLTestAssertEqualWithAccuracy(myself, expression1, expression2, accuracy, ...) \
_XCTPrimitiveAssertEqualWithAccuracy(myself, expression1, @#expression1, expression2, @#expression2, accuracy, @#accuracy, __VA_ARGS__)
#define MGLTestAssertNil(myself, expression, ...) \
_XCTPrimitiveAssertNil(myself, expression, @#expression, __VA_ARGS__)
#define MGLTestAssertNotNil(myself, expression, ...) \
_XCTPrimitiveAssertNotNil(myself, expression, @#expression, __VA_ARGS__)
@interface MGLMapViewIntegrationTest : XCTestCase <MGLMapViewDelegate>
@property (nonatomic) MGLMapView *mapView;
@property (nonatomic) MGLStyle *style;
@property (nonatomic) XCTestExpectation *styleLoadingExpectation;
@property (nonatomic) XCTestExpectation *renderFinishedExpectation;
@property (nonatomic) MGLAnnotationView * (^viewForAnnotation)(MGLMapView *mapView, id<MGLAnnotation> annotation);
@property (nonatomic) void (^regionWillChange)(MGLMapView *mapView, BOOL animated);
@property (nonatomic) void (^regionIsChanging)(MGLMapView *mapView);
@property (nonatomic) void (^regionDidChange)(MGLMapView *mapView, MGLCameraChangeReason reason, BOOL animated);
@property (nonatomic) CGPoint (^mapViewUserLocationAnchorPoint)(MGLMapView *mapView);
// Utility methods
- (NSString*)validAccessToken;
- (void)waitForMapViewToFinishLoadingStyleWithTimeout:(NSTimeInterval)timeout;
- (void)waitForMapViewToBeRenderedWithTimeout:(NSTimeInterval)timeout;
@end