diff options
author | Tobrun <tobrun@mapbox.com> | 2017-04-19 15:05:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-19 15:05:08 +0200 |
commit | 553ec88dc0350b9b034a0370300653d94f092382 (patch) | |
tree | 291aaa4e26979090a5b233d69e9cba557f0ab5f2 /platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/SymbolLayerTest.java | |
parent | 9c1150cfe9c1d7c4992e421695ce7c83a4840339 (diff) | |
download | qtlocation-mapboxgl-553ec88dc0350b9b034a0370300653d94f092382.tar.gz |
[android] - expose source layer identifier (#8709)
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/SymbolLayerTest.java')
-rw-r--r-- | platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/SymbolLayerTest.java | 50 |
1 files changed, 14 insertions, 36 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/SymbolLayerTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/SymbolLayerTest.java index d81965f2c9..97fc3e07d3 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/SymbolLayerTest.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/SymbolLayerTest.java @@ -83,6 +83,20 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(layer.getVisibility().getValue(), NONE); } + @Test + public void testSourceLayer() { + checkViewIsDisplayed(R.id.mapView); + Timber.i("Visibility"); + assertNotNull(layer); + + // Get initial + assertEquals(layer.getSourceLayer(), "composite"); + + // Set + final String sourceLayer = "test"; + layer.setSourceLayer(sourceLayer); + assertEquals(layer.getSourceLayer(), sourceLayer); + } @Test public void testSymbolPlacementAsConstant() { @@ -120,7 +134,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((IntervalStops) layer.getSymbolPlacement().getFunction().getStops()).size()); } - @Test public void testSymbolSpacingAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -158,7 +171,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((ExponentialStops) layer.getSymbolSpacing().getFunction().getStops()).size()); } - @Test public void testSymbolAvoidEdgesAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -195,7 +207,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((IntervalStops) layer.getSymbolAvoidEdges().getFunction().getStops()).size()); } - @Test public void testIconAllowOverlapAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -232,7 +243,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((IntervalStops) layer.getIconAllowOverlap().getFunction().getStops()).size()); } - @Test public void testIconIgnorePlacementAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -269,7 +279,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((IntervalStops) layer.getIconIgnorePlacement().getFunction().getStops()).size()); } - @Test public void testIconOptionalAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -306,7 +315,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((IntervalStops) layer.getIconOptional().getFunction().getStops()).size()); } - @Test public void testIconRotationAlignmentAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -343,7 +351,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((IntervalStops) layer.getIconRotationAlignment().getFunction().getStops()).size()); } - @Test public void testIconSizeAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -381,7 +388,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((ExponentialStops) layer.getIconSize().getFunction().getStops()).size()); } - @Test public void testIconSizeAsIdentitySourceFunction() { checkViewIsDisplayed(R.id.mapView); @@ -526,7 +532,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((IntervalStops) layer.getIconTextFit().getFunction().getStops()).size()); } - @Test public void testIconTextFitPaddingAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -564,7 +569,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((ExponentialStops) layer.getIconTextFitPadding().getFunction().getStops()).size()); } - @Test public void testIconImageAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -601,7 +605,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((IntervalStops) layer.getIconImage().getFunction().getStops()).size()); } - @Test public void testIconImageAsIdentitySourceFunction() { checkViewIsDisplayed(R.id.mapView); @@ -792,7 +795,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(0.9f, stop.out, 0.001f); } - @Test public void testIconPaddingAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -830,7 +832,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((ExponentialStops) layer.getIconPadding().getFunction().getStops()).size()); } - @Test public void testIconKeepUprightAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -867,7 +868,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((IntervalStops) layer.getIconKeepUpright().getFunction().getStops()).size()); } - @Test public void testIconOffsetAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -950,7 +950,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(IntervalStops.class, layer.getIconOffset().getFunction().getStops().getClass()); } - @Test public void testTextPitchAlignmentAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -987,7 +986,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((IntervalStops) layer.getTextPitchAlignment().getFunction().getStops()).size()); } - @Test public void testTextRotationAlignmentAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -1024,7 +1022,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((IntervalStops) layer.getTextRotationAlignment().getFunction().getStops()).size()); } - @Test public void testTextFieldAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -1106,7 +1103,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(IntervalStops.class, layer.getTextField().getFunction().getStops().getClass()); } - @Test public void testTextFontAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -1143,7 +1139,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((IntervalStops) layer.getTextFont().getFunction().getStops()).size()); } - @Test public void testTextSizeAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -1181,7 +1176,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((ExponentialStops) layer.getTextSize().getFunction().getStops()).size()); } - @Test public void testTextSizeAsIdentitySourceFunction() { checkViewIsDisplayed(R.id.mapView); @@ -1327,7 +1321,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((ExponentialStops) layer.getTextMaxWidth().getFunction().getStops()).size()); } - @Test public void testTextLineHeightAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -1365,7 +1358,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((ExponentialStops) layer.getTextLineHeight().getFunction().getStops()).size()); } - @Test public void testTextLetterSpacingAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -1403,7 +1395,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((ExponentialStops) layer.getTextLetterSpacing().getFunction().getStops()).size()); } - @Test public void testTextJustifyAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -1440,7 +1431,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((IntervalStops) layer.getTextJustify().getFunction().getStops()).size()); } - @Test public void testTextAnchorAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -1477,7 +1467,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((IntervalStops) layer.getTextAnchor().getFunction().getStops()).size()); } - @Test public void testTextMaxAngleAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -1515,7 +1504,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((ExponentialStops) layer.getTextMaxAngle().getFunction().getStops()).size()); } - @Test public void testTextRotateAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -1553,7 +1541,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((ExponentialStops) layer.getTextRotate().getFunction().getStops()).size()); } - @Test public void testTextRotateAsIdentitySourceFunction() { checkViewIsDisplayed(R.id.mapView); @@ -1699,7 +1686,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((ExponentialStops) layer.getTextPadding().getFunction().getStops()).size()); } - @Test public void testTextKeepUprightAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -1736,7 +1722,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((IntervalStops) layer.getTextKeepUpright().getFunction().getStops()).size()); } - @Test public void testTextTransformAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -1818,7 +1803,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(IntervalStops.class, layer.getTextTransform().getFunction().getStops().getClass()); } - @Test public void testTextOffsetAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -1901,7 +1885,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(IntervalStops.class, layer.getTextOffset().getFunction().getStops().getClass()); } - @Test public void testTextAllowOverlapAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -1938,7 +1921,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((IntervalStops) layer.getTextAllowOverlap().getFunction().getStops()).size()); } - @Test public void testTextIgnorePlacementAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -1975,7 +1957,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((IntervalStops) layer.getTextIgnorePlacement().getFunction().getStops()).size()); } - @Test public void testTextOptionalAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -2800,7 +2781,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((ExponentialStops) layer.getIconTranslate().getFunction().getStops()).size()); } - @Test public void testIconTranslateAnchorAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -3625,7 +3605,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((ExponentialStops) layer.getTextTranslate().getFunction().getStops()).size()); } - @Test public void testTextTranslateAnchorAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -3662,7 +3641,6 @@ public class SymbolLayerTest extends BaseStyleTest { assertEquals(1, ((IntervalStops) layer.getTextTranslateAnchor().getFunction().getStops()).size()); } - @After public void unregisterIntentServiceIdlingResource() { Espresso.unregisterIdlingResources(idlingResource); |