blob: e36ca530221d88a119f7499165abfc3990ef17cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
#import "MGLStyleLayerTests.h"
@interface MGLBackgroundLayerTests : MGLStyleLayerTests
@end
@implementation MGLBackgroundLayerTests
- (void)testBackgroundLayer {
NSString *filePath = [[NSBundle bundleForClass:self.class] pathForResource:@"amsterdam" ofType:@"geojson"];
NSURL *url = [NSURL fileURLWithPath:filePath];
MGLGeoJSONSource *source = [[MGLGeoJSONSource alloc] initWithSourceIdentifier:@"sourceID" URL:url];
MGLBackgroundStyleLayer *layer = [[MGLBackgroundStyleLayer alloc] initWithLayerIdentifier:@"layerID" sourceIdentifier:@"sourceID"];
[self.mapView.style addSource:source];
[self.mapView.style addLayer:layer];
layer.backgroundColor = MGLRuntimeStylingHelper.testColor;
layer.backgroundPattern = MGLRuntimeStylingHelper.testString;
layer.backgroundOpacity = MGLRuntimeStylingHelper.testNumber;
MGLBackgroundStyleLayer *gLayer = [self.mapView.style layerWithIdentifier:@"layerID"];
XCTAssertEqualObjects(gLayer.backgroundColor, MGLRuntimeStylingHelper.testColor);
XCTAssertEqualObjects(gLayer.backgroundPattern, MGLRuntimeStylingHelper.testString);
XCTAssertEqualObjects(gLayer.backgroundOpacity, MGLRuntimeStylingHelper.testNumber);
}
@end
|