diff options
author | Tobrun <tobrun@mapbox.com> | 2017-03-31 17:51:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-31 17:51:26 +0200 |
commit | 939526bac4aff734be4e6382b64c43214eb0bc9b (patch) | |
tree | b286e7b2b72b4776d2adfed628e0bebf38ec9710 /platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/LineLayerTest.java | |
parent | 05992c47aca0c83d5c0abc79c8e7833d69d24803 (diff) | |
download | qtlocation-mapboxgl-939526bac4aff734be4e6382b64c43214eb0bc9b.tar.gz |
[android] - transition options for layer properties (#8509)
[android] fixup highlevel bindings for transition options
finish integration
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/LineLayerTest.java')
-rw-r--r-- | platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/LineLayerTest.java | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/LineLayerTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/LineLayerTest.java index 466873f9e5..110d23dd90 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/LineLayerTest.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/LineLayerTest.java @@ -36,6 +36,8 @@ import static org.junit.Assert.*; import static com.mapbox.mapboxsdk.style.layers.Property.*; import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.*; +import com.mapbox.mapboxsdk.style.layers.TransitionOptions; + /** * Basic smoke tests for LineLayer */ @@ -81,6 +83,7 @@ public class LineLayerTest extends BaseStyleTest { assertEquals(layer.getVisibility().getValue(), NONE); } + @Test public void testLineCapAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -117,6 +120,7 @@ public class LineLayerTest extends BaseStyleTest { assertEquals(1, ((IntervalStops) layer.getLineCap().getFunction().getStops()).size()); } + @Test public void testLineJoinAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -153,6 +157,7 @@ public class LineLayerTest extends BaseStyleTest { assertEquals(1, ((IntervalStops) layer.getLineJoin().getFunction().getStops()).size()); } + @Test public void testLineMiterLimitAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -190,6 +195,7 @@ public class LineLayerTest extends BaseStyleTest { assertEquals(1, ((ExponentialStops) layer.getLineMiterLimit().getFunction().getStops()).size()); } + @Test public void testLineRoundLimitAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -228,6 +234,18 @@ public class LineLayerTest extends BaseStyleTest { } @Test + public void testLineOpacityTransition() { + checkViewIsDisplayed(R.id.mapView); + Timber.i("line-opacityTransitionOptions"); + assertNotNull(layer); + + // Set and Get + TransitionOptions options = new TransitionOptions(300, 100); + layer.setLineOpacityTransition(options); + assertEquals(layer.getLineOpacityTransition(), options); + } + + @Test public void testLineOpacityAsConstant() { checkViewIsDisplayed(R.id.mapView); Timber.i("line-opacity"); @@ -373,6 +391,18 @@ public class LineLayerTest extends BaseStyleTest { } @Test + public void testLineColorTransition() { + checkViewIsDisplayed(R.id.mapView); + Timber.i("line-colorTransitionOptions"); + assertNotNull(layer); + + // Set and Get + TransitionOptions options = new TransitionOptions(300, 100); + layer.setLineColorTransition(options); + assertEquals(layer.getLineColorTransition(), options); + } + + @Test public void testLineColorAsConstant() { checkViewIsDisplayed(R.id.mapView); Timber.i("line-color"); @@ -495,6 +525,18 @@ public class LineLayerTest extends BaseStyleTest { } @Test + public void testLineTranslateTransition() { + checkViewIsDisplayed(R.id.mapView); + Timber.i("line-translateTransitionOptions"); + assertNotNull(layer); + + // Set and Get + TransitionOptions options = new TransitionOptions(300, 100); + layer.setLineTranslateTransition(options); + assertEquals(layer.getLineTranslateTransition(), options); + } + + @Test public void testLineTranslateAsConstant() { checkViewIsDisplayed(R.id.mapView); Timber.i("line-translate"); @@ -531,6 +573,7 @@ public class LineLayerTest extends BaseStyleTest { assertEquals(1, ((ExponentialStops) layer.getLineTranslate().getFunction().getStops()).size()); } + @Test public void testLineTranslateAnchorAsConstant() { checkViewIsDisplayed(R.id.mapView); @@ -568,6 +611,18 @@ public class LineLayerTest extends BaseStyleTest { } @Test + public void testLineWidthTransition() { + checkViewIsDisplayed(R.id.mapView); + Timber.i("line-widthTransitionOptions"); + assertNotNull(layer); + + // Set and Get + TransitionOptions options = new TransitionOptions(300, 100); + layer.setLineWidthTransition(options); + assertEquals(layer.getLineWidthTransition(), options); + } + + @Test public void testLineWidthAsConstant() { checkViewIsDisplayed(R.id.mapView); Timber.i("line-width"); @@ -605,6 +660,18 @@ public class LineLayerTest extends BaseStyleTest { } @Test + public void testLineGapWidthTransition() { + checkViewIsDisplayed(R.id.mapView); + Timber.i("line-gap-widthTransitionOptions"); + assertNotNull(layer); + + // Set and Get + TransitionOptions options = new TransitionOptions(300, 100); + layer.setLineGapWidthTransition(options); + assertEquals(layer.getLineGapWidthTransition(), options); + } + + @Test public void testLineGapWidthAsConstant() { checkViewIsDisplayed(R.id.mapView); Timber.i("line-gap-width"); @@ -750,6 +817,18 @@ public class LineLayerTest extends BaseStyleTest { } @Test + public void testLineOffsetTransition() { + checkViewIsDisplayed(R.id.mapView); + Timber.i("line-offsetTransitionOptions"); + assertNotNull(layer); + + // Set and Get + TransitionOptions options = new TransitionOptions(300, 100); + layer.setLineOffsetTransition(options); + assertEquals(layer.getLineOffsetTransition(), options); + } + + @Test public void testLineOffsetAsConstant() { checkViewIsDisplayed(R.id.mapView); Timber.i("line-offset"); @@ -895,6 +974,18 @@ public class LineLayerTest extends BaseStyleTest { } @Test + public void testLineBlurTransition() { + checkViewIsDisplayed(R.id.mapView); + Timber.i("line-blurTransitionOptions"); + assertNotNull(layer); + + // Set and Get + TransitionOptions options = new TransitionOptions(300, 100); + layer.setLineBlurTransition(options); + assertEquals(layer.getLineBlurTransition(), options); + } + + @Test public void testLineBlurAsConstant() { checkViewIsDisplayed(R.id.mapView); Timber.i("line-blur"); @@ -1040,6 +1131,18 @@ public class LineLayerTest extends BaseStyleTest { } @Test + public void testLineDasharrayTransition() { + checkViewIsDisplayed(R.id.mapView); + Timber.i("line-dasharrayTransitionOptions"); + assertNotNull(layer); + + // Set and Get + TransitionOptions options = new TransitionOptions(300, 100); + layer.setLineDasharrayTransition(options); + assertEquals(layer.getLineDasharrayTransition(), options); + } + + @Test public void testLineDasharrayAsConstant() { checkViewIsDisplayed(R.id.mapView); Timber.i("line-dasharray"); @@ -1076,6 +1179,18 @@ public class LineLayerTest extends BaseStyleTest { } @Test + public void testLinePatternTransition() { + checkViewIsDisplayed(R.id.mapView); + Timber.i("line-patternTransitionOptions"); + assertNotNull(layer); + + // Set and Get + TransitionOptions options = new TransitionOptions(300, 100); + layer.setLinePatternTransition(options); + assertEquals(layer.getLinePatternTransition(), options); + } + + @Test public void testLinePatternAsConstant() { checkViewIsDisplayed(R.id.mapView); Timber.i("line-pattern"); |