summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/LineLayerTest.java
diff options
context:
space:
mode:
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.java1871
1 files changed, 1036 insertions, 835 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 c10c908c8d..544c5505ed 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
@@ -3,14 +3,10 @@
package com.mapbox.mapboxsdk.testapp.style;
import android.graphics.Color;
-import android.support.test.espresso.Espresso;
-import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
-import timber.log.Timber;
-import com.mapbox.mapboxsdk.maps.MapboxMap;
-import com.mapbox.mapboxsdk.style.functions.CompositeFunction;
import com.mapbox.mapboxsdk.style.functions.CameraFunction;
+import com.mapbox.mapboxsdk.style.functions.CompositeFunction;
import com.mapbox.mapboxsdk.style.functions.SourceFunction;
import com.mapbox.mapboxsdk.style.functions.stops.CategoricalStops;
import com.mapbox.mapboxsdk.style.functions.stops.ExponentialStops;
@@ -19,26 +15,45 @@ import com.mapbox.mapboxsdk.style.functions.stops.IntervalStops;
import com.mapbox.mapboxsdk.style.functions.stops.Stop;
import com.mapbox.mapboxsdk.style.functions.stops.Stops;
import com.mapbox.mapboxsdk.style.layers.LineLayer;
-import com.mapbox.mapboxsdk.testapp.R;
-import com.mapbox.mapboxsdk.testapp.activity.style.RuntimeStyleTestActivity;
-import com.mapbox.mapboxsdk.testapp.utils.OnMapReadyIdlingResource;
+import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
import com.mapbox.mapboxsdk.testapp.activity.BaseActivityTest;
+import com.mapbox.mapboxsdk.testapp.activity.espresso.EspressoTestActivity;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
-import static com.mapbox.mapboxsdk.style.functions.Function.*;
-import static com.mapbox.mapboxsdk.style.functions.stops.Stop.stop;
-import static com.mapbox.mapboxsdk.style.functions.stops.Stops.*;
-import static org.junit.Assert.*;
-import static com.mapbox.mapboxsdk.style.layers.Property.*;
-import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.*;
+import timber.log.Timber;
-import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
-import com.mapbox.mapboxsdk.testapp.activity.espresso.EspressoTestActivity;
+import static com.mapbox.mapboxsdk.style.functions.Function.composite;
+import static com.mapbox.mapboxsdk.style.functions.Function.property;
+import static com.mapbox.mapboxsdk.style.functions.Function.zoom;
+import static com.mapbox.mapboxsdk.style.functions.stops.Stop.stop;
+import static com.mapbox.mapboxsdk.style.functions.stops.Stops.categorical;
+import static com.mapbox.mapboxsdk.style.functions.stops.Stops.exponential;
+import static com.mapbox.mapboxsdk.style.functions.stops.Stops.interval;
+import static com.mapbox.mapboxsdk.style.layers.Property.LINE_CAP_BUTT;
+import static com.mapbox.mapboxsdk.style.layers.Property.LINE_JOIN_BEVEL;
+import static com.mapbox.mapboxsdk.style.layers.Property.LINE_TRANSLATE_ANCHOR_MAP;
+import static com.mapbox.mapboxsdk.style.layers.Property.NONE;
+import static com.mapbox.mapboxsdk.style.layers.Property.VISIBLE;
+import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.lineBlur;
+import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.lineCap;
+import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.lineColor;
+import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.lineDasharray;
+import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.lineGapWidth;
+import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.lineJoin;
+import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.lineMiterLimit;
+import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.lineOffset;
+import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.lineOpacity;
+import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.linePattern;
+import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.lineRoundLimit;
+import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.lineTranslate;
+import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.lineTranslateAnchor;
+import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.lineWidth;
+import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.visibility;
+import static com.mapbox.mapboxsdk.testapp.action.MapboxMapAction.invoke;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
/**
* Basic smoke tests for LineLayer
@@ -53,15 +68,18 @@ public class LineLayerTest extends BaseActivityTest {
return EspressoTestActivity.class;
}
- private void setupLayer(){
- if ((layer = mapboxMap.getLayerAs("my-layer")) == null) {
- Timber.i("Adding layer");
- layer = new LineLayer("my-layer", "composite");
- layer.setSourceLayer("composite");
- mapboxMap.addLayer(layer);
- // Layer reference is now stale, get new reference
- layer = mapboxMap.getLayerAs("my-layer");
- }
+ private void setupLayer() {
+ Timber.i("Retrieving layer");
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ if ((layer = mapboxMap.getLayerAs("my-layer")) == null) {
+ Timber.i("Adding layer");
+ layer = new LineLayer("my-layer", "composite");
+ layer.setSourceLayer("composite");
+ mapboxMap.addLayer(layer);
+ // Layer reference is now stale, get new reference
+ layer = mapboxMap.getLayerAs("my-layer");
+ }
+ });
}
@Test
@@ -69,14 +87,16 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("Visibility");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Get initial
- assertEquals(layer.getVisibility().getValue(), VISIBLE);
+ // Get initial
+ assertEquals(layer.getVisibility().getValue(), VISIBLE);
- // Set
- layer.setProperties(visibility(NONE));
- assertEquals(layer.getVisibility().getValue(), NONE);
+ // Set
+ layer.setProperties(visibility(NONE));
+ assertEquals(layer.getVisibility().getValue(), NONE);
+ });
}
@Test
@@ -84,15 +104,17 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("SourceLayer");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Get initial
- assertEquals(layer.getSourceLayer(), "composite");
+ // Get initial
+ assertEquals(layer.getSourceLayer(), "composite");
- // Set
- final String sourceLayer = "test";
- layer.setSourceLayer(sourceLayer);
- assertEquals(layer.getSourceLayer(), sourceLayer);
+ // Set
+ final String sourceLayer = "test";
+ layer.setSourceLayer(sourceLayer);
+ assertEquals(layer.getSourceLayer(), sourceLayer);
+ });
}
@Test
@@ -100,11 +122,13 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-cap");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- layer.setProperties(lineCap(LINE_CAP_BUTT));
- assertEquals((String) layer.getLineCap().getValue(), (String) LINE_CAP_BUTT);
+ // Set and Get
+ layer.setProperties(lineCap(LINE_CAP_BUTT));
+ assertEquals((String) layer.getLineCap().getValue(), (String) LINE_CAP_BUTT);
+ });
}
@Test
@@ -112,25 +136,27 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-cap");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineCap(
- zoom(
- interval(
- stop(2, lineCap(LINE_CAP_BUTT))
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineCap(
+ zoom(
+ interval(
+ stop(2, lineCap(LINE_CAP_BUTT))
+ )
)
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getLineCap());
- assertNotNull(layer.getLineCap().getFunction());
- assertEquals(CameraFunction.class, layer.getLineCap().getFunction().getClass());
- assertEquals(IntervalStops.class, layer.getLineCap().getFunction().getStops().getClass());
- assertEquals(1, ((IntervalStops) layer.getLineCap().getFunction().getStops()).size());
+ // Verify
+ assertNotNull(layer.getLineCap());
+ assertNotNull(layer.getLineCap().getFunction());
+ assertEquals(CameraFunction.class, layer.getLineCap().getFunction().getClass());
+ assertEquals(IntervalStops.class, layer.getLineCap().getFunction().getStops().getClass());
+ assertEquals(1, ((IntervalStops) layer.getLineCap().getFunction().getStops()).size());
+ });
}
@Test
@@ -138,11 +164,13 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-join");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- layer.setProperties(lineJoin(LINE_JOIN_BEVEL));
- assertEquals((String) layer.getLineJoin().getValue(), (String) LINE_JOIN_BEVEL);
+ // Set and Get
+ layer.setProperties(lineJoin(LINE_JOIN_BEVEL));
+ assertEquals((String) layer.getLineJoin().getValue(), (String) LINE_JOIN_BEVEL);
+ });
}
@Test
@@ -150,25 +178,78 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-join");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineJoin(
- zoom(
- interval(
- stop(2, lineJoin(LINE_JOIN_BEVEL))
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineJoin(
+ zoom(
+ interval(
+ stop(2, lineJoin(LINE_JOIN_BEVEL))
+ )
+ )
+ )
+ );
+
+ // Verify
+ assertNotNull(layer.getLineJoin());
+ assertNotNull(layer.getLineJoin().getFunction());
+ assertEquals(CameraFunction.class, layer.getLineJoin().getFunction().getClass());
+ assertEquals(IntervalStops.class, layer.getLineJoin().getFunction().getStops().getClass());
+ assertEquals(1, ((IntervalStops) layer.getLineJoin().getFunction().getStops()).size());
+ });
+ }
+
+ @Test
+ public void testLineJoinAsIdentitySourceFunction() {
+ validateTestSetup();
+ setupLayer();
+ Timber.i("line-join");
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineJoin(property("FeaturePropertyA", Stops.<String>identity()))
+ );
+
+ // Verify
+ assertNotNull(layer.getLineJoin());
+ assertNotNull(layer.getLineJoin().getFunction());
+ assertEquals(SourceFunction.class, layer.getLineJoin().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineJoin().getFunction()).getProperty());
+ assertEquals(IdentityStops.class, layer.getLineJoin().getFunction().getStops().getClass());
+ });
+ }
+
+ @Test
+ public void testLineJoinAsIntervalSourceFunction() {
+ validateTestSetup();
+ setupLayer();
+ Timber.i("line-join");
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineJoin(
+ property(
+ "FeaturePropertyA",
+ interval(
+ stop(1, lineJoin(LINE_JOIN_BEVEL))
+ )
)
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getLineJoin());
- assertNotNull(layer.getLineJoin().getFunction());
- assertEquals(CameraFunction.class, layer.getLineJoin().getFunction().getClass());
- assertEquals(IntervalStops.class, layer.getLineJoin().getFunction().getStops().getClass());
- assertEquals(1, ((IntervalStops) layer.getLineJoin().getFunction().getStops()).size());
+ // Verify
+ assertNotNull(layer.getLineJoin());
+ assertNotNull(layer.getLineJoin().getFunction());
+ assertEquals(SourceFunction.class, layer.getLineJoin().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineJoin().getFunction()).getProperty());
+ assertEquals(IntervalStops.class, layer.getLineJoin().getFunction().getStops().getClass());
+ });
}
@Test
@@ -176,11 +257,13 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-miter-limit");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- layer.setProperties(lineMiterLimit(0.3f));
- assertEquals((Float) layer.getLineMiterLimit().getValue(), (Float) 0.3f);
+ // Set and Get
+ layer.setProperties(lineMiterLimit(0.3f));
+ assertEquals((Float) layer.getLineMiterLimit().getValue(), (Float) 0.3f);
+ });
}
@Test
@@ -188,26 +271,28 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-miter-limit");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineMiterLimit(
- zoom(
- exponential(
- stop(2, lineMiterLimit(0.3f))
- ).withBase(0.5f)
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineMiterLimit(
+ zoom(
+ exponential(
+ stop(2, lineMiterLimit(0.3f))
+ ).withBase(0.5f)
+ )
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getLineMiterLimit());
- assertNotNull(layer.getLineMiterLimit().getFunction());
- assertEquals(CameraFunction.class, layer.getLineMiterLimit().getFunction().getClass());
- assertEquals(ExponentialStops.class, layer.getLineMiterLimit().getFunction().getStops().getClass());
- assertEquals(0.5f, ((ExponentialStops) layer.getLineMiterLimit().getFunction().getStops()).getBase(), 0.001);
- assertEquals(1, ((ExponentialStops) layer.getLineMiterLimit().getFunction().getStops()).size());
+ // Verify
+ assertNotNull(layer.getLineMiterLimit());
+ assertNotNull(layer.getLineMiterLimit().getFunction());
+ assertEquals(CameraFunction.class, layer.getLineMiterLimit().getFunction().getClass());
+ assertEquals(ExponentialStops.class, layer.getLineMiterLimit().getFunction().getStops().getClass());
+ assertEquals(0.5f, ((ExponentialStops) layer.getLineMiterLimit().getFunction().getStops()).getBase(), 0.001);
+ assertEquals(1, ((ExponentialStops) layer.getLineMiterLimit().getFunction().getStops()).size());
+ });
}
@Test
@@ -215,11 +300,13 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-round-limit");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- layer.setProperties(lineRoundLimit(0.3f));
- assertEquals((Float) layer.getLineRoundLimit().getValue(), (Float) 0.3f);
+ // Set and Get
+ layer.setProperties(lineRoundLimit(0.3f));
+ assertEquals((Float) layer.getLineRoundLimit().getValue(), (Float) 0.3f);
+ });
}
@Test
@@ -227,26 +314,28 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-round-limit");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineRoundLimit(
- zoom(
- exponential(
- stop(2, lineRoundLimit(0.3f))
- ).withBase(0.5f)
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineRoundLimit(
+ zoom(
+ exponential(
+ stop(2, lineRoundLimit(0.3f))
+ ).withBase(0.5f)
+ )
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getLineRoundLimit());
- assertNotNull(layer.getLineRoundLimit().getFunction());
- assertEquals(CameraFunction.class, layer.getLineRoundLimit().getFunction().getClass());
- assertEquals(ExponentialStops.class, layer.getLineRoundLimit().getFunction().getStops().getClass());
- assertEquals(0.5f, ((ExponentialStops) layer.getLineRoundLimit().getFunction().getStops()).getBase(), 0.001);
- assertEquals(1, ((ExponentialStops) layer.getLineRoundLimit().getFunction().getStops()).size());
+ // Verify
+ assertNotNull(layer.getLineRoundLimit());
+ assertNotNull(layer.getLineRoundLimit().getFunction());
+ assertEquals(CameraFunction.class, layer.getLineRoundLimit().getFunction().getClass());
+ assertEquals(ExponentialStops.class, layer.getLineRoundLimit().getFunction().getStops().getClass());
+ assertEquals(0.5f, ((ExponentialStops) layer.getLineRoundLimit().getFunction().getStops()).getBase(), 0.001);
+ assertEquals(1, ((ExponentialStops) layer.getLineRoundLimit().getFunction().getStops()).size());
+ });
}
@Test
@@ -254,12 +343,14 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-opacityTransitionOptions");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- TransitionOptions options = new TransitionOptions(300, 100);
- layer.setLineOpacityTransition(options);
- assertEquals(layer.getLineOpacityTransition(), options);
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setLineOpacityTransition(options);
+ assertEquals(layer.getLineOpacityTransition(), options);
+ });
}
@Test
@@ -267,11 +358,13 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-opacity");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- layer.setProperties(lineOpacity(0.3f));
- assertEquals((Float) layer.getLineOpacity().getValue(), (Float) 0.3f);
+ // Set and Get
+ layer.setProperties(lineOpacity(0.3f));
+ assertEquals((Float) layer.getLineOpacity().getValue(), (Float) 0.3f);
+ });
}
@Test
@@ -279,26 +372,28 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-opacity");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineOpacity(
- zoom(
- exponential(
- stop(2, lineOpacity(0.3f))
- ).withBase(0.5f)
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineOpacity(
+ zoom(
+ exponential(
+ stop(2, lineOpacity(0.3f))
+ ).withBase(0.5f)
+ )
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getLineOpacity());
- assertNotNull(layer.getLineOpacity().getFunction());
- assertEquals(CameraFunction.class, layer.getLineOpacity().getFunction().getClass());
- assertEquals(ExponentialStops.class, layer.getLineOpacity().getFunction().getStops().getClass());
- assertEquals(0.5f, ((ExponentialStops) layer.getLineOpacity().getFunction().getStops()).getBase(), 0.001);
- assertEquals(1, ((ExponentialStops) layer.getLineOpacity().getFunction().getStops()).size());
+ // Verify
+ assertNotNull(layer.getLineOpacity());
+ assertNotNull(layer.getLineOpacity().getFunction());
+ assertEquals(CameraFunction.class, layer.getLineOpacity().getFunction().getClass());
+ assertEquals(ExponentialStops.class, layer.getLineOpacity().getFunction().getStops().getClass());
+ assertEquals(0.5f, ((ExponentialStops) layer.getLineOpacity().getFunction().getStops()).getBase(), 0.001);
+ assertEquals(1, ((ExponentialStops) layer.getLineOpacity().getFunction().getStops()).size());
+ });
}
@Test
@@ -306,19 +401,21 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-opacity");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set
- layer.setProperties(
- lineOpacity(property("FeaturePropertyA", Stops.<Float>identity()))
- );
+ // Set
+ layer.setProperties(
+ lineOpacity(property("FeaturePropertyA", Stops.<Float>identity()))
+ );
- // Verify
- assertNotNull(layer.getLineOpacity());
- assertNotNull(layer.getLineOpacity().getFunction());
- assertEquals(SourceFunction.class, layer.getLineOpacity().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineOpacity().getFunction()).getProperty());
- assertEquals(IdentityStops.class, layer.getLineOpacity().getFunction().getStops().getClass());
+ // Verify
+ assertNotNull(layer.getLineOpacity());
+ assertNotNull(layer.getLineOpacity().getFunction());
+ assertEquals(SourceFunction.class, layer.getLineOpacity().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineOpacity().getFunction()).getProperty());
+ assertEquals(IdentityStops.class, layer.getLineOpacity().getFunction().getStops().getClass());
+ });
}
@Test
@@ -326,26 +423,28 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-opacity");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineOpacity(
- property(
- "FeaturePropertyA",
- exponential(
- stop(0.3f, lineOpacity(0.3f))
- ).withBase(0.5f)
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineOpacity(
+ property(
+ "FeaturePropertyA",
+ exponential(
+ stop(0.3f, lineOpacity(0.3f))
+ ).withBase(0.5f)
+ )
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getLineOpacity());
- assertNotNull(layer.getLineOpacity().getFunction());
- assertEquals(SourceFunction.class, layer.getLineOpacity().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineOpacity().getFunction()).getProperty());
- assertEquals(ExponentialStops.class, layer.getLineOpacity().getFunction().getStops().getClass());
+ // Verify
+ assertNotNull(layer.getLineOpacity());
+ assertNotNull(layer.getLineOpacity().getFunction());
+ assertEquals(SourceFunction.class, layer.getLineOpacity().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineOpacity().getFunction()).getProperty());
+ assertEquals(ExponentialStops.class, layer.getLineOpacity().getFunction().getStops().getClass());
+ });
}
@Test
@@ -353,29 +452,32 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-opacity");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineOpacity(
- property(
- "FeaturePropertyA",
- categorical(
- stop(1.0f, lineOpacity(0.3f))
- )
- ).withDefaultValue(lineOpacity(0.3f))
- )
- );
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineOpacity(
+ property(
+ "FeaturePropertyA",
+ categorical(
+ stop(1.0f, lineOpacity(0.3f))
+ )
+ ).withDefaultValue(lineOpacity(0.3f))
+ )
+ );
+
+ // Verify
+ assertNotNull(layer.getLineOpacity());
+ assertNotNull(layer.getLineOpacity().getFunction());
+ assertEquals(SourceFunction.class, layer.getLineOpacity().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineOpacity().getFunction()).getProperty());
+ assertEquals(CategoricalStops.class, layer.getLineOpacity().getFunction().getStops().getClass());
+ assertNotNull(((SourceFunction) layer.getLineOpacity().getFunction()).getDefaultValue());
+ assertNotNull(((SourceFunction) layer.getLineOpacity().getFunction()).getDefaultValue().getValue());
+ assertEquals(0.3f, ((SourceFunction) layer.getLineOpacity().getFunction()).getDefaultValue().getValue());
+ });
- // Verify
- assertNotNull(layer.getLineOpacity());
- assertNotNull(layer.getLineOpacity().getFunction());
- assertEquals(SourceFunction.class, layer.getLineOpacity().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineOpacity().getFunction()).getProperty());
- assertEquals(CategoricalStops.class, layer.getLineOpacity().getFunction().getStops().getClass());
- assertNotNull(((SourceFunction) layer.getLineOpacity().getFunction()).getDefaultValue());
- assertNotNull(((SourceFunction) layer.getLineOpacity().getFunction()).getDefaultValue().getValue());
- assertEquals(0.3f, ((SourceFunction) layer.getLineOpacity().getFunction()).getDefaultValue().getValue());
}
@Test
@@ -383,34 +485,36 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-opacity");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineOpacity(
- composite(
- "FeaturePropertyA",
- exponential(
- stop(0, 0.3f, lineOpacity(0.9f))
- ).withBase(0.5f)
- ).withDefaultValue(lineOpacity(0.3f))
- )
- );
-
- // Verify
- assertNotNull(layer.getLineOpacity());
- assertNotNull(layer.getLineOpacity().getFunction());
- assertEquals(CompositeFunction.class, layer.getLineOpacity().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((CompositeFunction) layer.getLineOpacity().getFunction()).getProperty());
- assertEquals(ExponentialStops.class, layer.getLineOpacity().getFunction().getStops().getClass());
- assertEquals(1, ((ExponentialStops) layer.getLineOpacity().getFunction().getStops()).size());
-
- ExponentialStops<Stop.CompositeValue<Float, Float>, Float> stops =
- (ExponentialStops<Stop.CompositeValue<Float, Float>, Float>) layer.getLineOpacity().getFunction().getStops();
- Stop<Stop.CompositeValue<Float, Float>, Float> stop = stops.iterator().next();
- assertEquals(0f, stop.in.zoom, 0.001);
- assertEquals(0.3f, stop.in.value, 0.001f);
- assertEquals(0.9f, stop.out, 0.001f);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineOpacity(
+ composite(
+ "FeaturePropertyA",
+ exponential(
+ stop(0, 0.3f, lineOpacity(0.9f))
+ ).withBase(0.5f)
+ ).withDefaultValue(lineOpacity(0.3f))
+ )
+ );
+
+ // Verify
+ assertNotNull(layer.getLineOpacity());
+ assertNotNull(layer.getLineOpacity().getFunction());
+ assertEquals(CompositeFunction.class, layer.getLineOpacity().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((CompositeFunction) layer.getLineOpacity().getFunction()).getProperty());
+ assertEquals(ExponentialStops.class, layer.getLineOpacity().getFunction().getStops().getClass());
+ assertEquals(1, ((ExponentialStops) layer.getLineOpacity().getFunction().getStops()).size());
+
+ ExponentialStops<Stop.CompositeValue<Float, Float>, Float> stops =
+ (ExponentialStops<Stop.CompositeValue<Float, Float>, Float>) layer.getLineOpacity().getFunction().getStops();
+ Stop<Stop.CompositeValue<Float, Float>, Float> stop = stops.iterator().next();
+ assertEquals(0f, stop.in.zoom, 0.001);
+ assertEquals(0.3f, stop.in.value, 0.001f);
+ assertEquals(0.9f, stop.out, 0.001f);
+ });
}
@Test
@@ -418,12 +522,14 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-colorTransitionOptions");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- TransitionOptions options = new TransitionOptions(300, 100);
- layer.setLineColorTransition(options);
- assertEquals(layer.getLineColorTransition(), options);
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setLineColorTransition(options);
+ assertEquals(layer.getLineColorTransition(), options);
+ });
}
@Test
@@ -431,11 +537,13 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-color");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- layer.setProperties(lineColor("rgba(0, 0, 0, 1)"));
- assertEquals((String) layer.getLineColor().getValue(), (String) "rgba(0, 0, 0, 1)");
+ // Set and Get
+ layer.setProperties(lineColor("rgba(0, 0, 0, 1)"));
+ assertEquals((String) layer.getLineColor().getValue(), (String) "rgba(0, 0, 0, 1)");
+ });
}
@Test
@@ -443,26 +551,28 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-color");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineColor(
- zoom(
- exponential(
- stop(2, lineColor("rgba(0, 0, 0, 1)"))
- ).withBase(0.5f)
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineColor(
+ zoom(
+ exponential(
+ stop(2, lineColor("rgba(0, 0, 0, 1)"))
+ ).withBase(0.5f)
+ )
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getLineColor());
- assertNotNull(layer.getLineColor().getFunction());
- assertEquals(CameraFunction.class, layer.getLineColor().getFunction().getClass());
- assertEquals(ExponentialStops.class, layer.getLineColor().getFunction().getStops().getClass());
- assertEquals(0.5f, ((ExponentialStops) layer.getLineColor().getFunction().getStops()).getBase(), 0.001);
- assertEquals(1, ((ExponentialStops) layer.getLineColor().getFunction().getStops()).size());
+ // Verify
+ assertNotNull(layer.getLineColor());
+ assertNotNull(layer.getLineColor().getFunction());
+ assertEquals(CameraFunction.class, layer.getLineColor().getFunction().getClass());
+ assertEquals(ExponentialStops.class, layer.getLineColor().getFunction().getStops().getClass());
+ assertEquals(0.5f, ((ExponentialStops) layer.getLineColor().getFunction().getStops()).getBase(), 0.001);
+ assertEquals(1, ((ExponentialStops) layer.getLineColor().getFunction().getStops()).size());
+ });
}
@Test
@@ -470,19 +580,21 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-color");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set
- layer.setProperties(
- lineColor(property("FeaturePropertyA", Stops.<String>identity()))
- );
+ // Set
+ layer.setProperties(
+ lineColor(property("FeaturePropertyA", Stops.<String>identity()))
+ );
- // Verify
- assertNotNull(layer.getLineColor());
- assertNotNull(layer.getLineColor().getFunction());
- assertEquals(SourceFunction.class, layer.getLineColor().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineColor().getFunction()).getProperty());
- assertEquals(IdentityStops.class, layer.getLineColor().getFunction().getStops().getClass());
+ // Verify
+ assertNotNull(layer.getLineColor());
+ assertNotNull(layer.getLineColor().getFunction());
+ assertEquals(SourceFunction.class, layer.getLineColor().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineColor().getFunction()).getProperty());
+ assertEquals(IdentityStops.class, layer.getLineColor().getFunction().getStops().getClass());
+ });
}
@Test
@@ -490,26 +602,28 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-color");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineColor(
- property(
- "FeaturePropertyA",
- exponential(
- stop(Color.RED, lineColor(Color.RED))
- ).withBase(0.5f)
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineColor(
+ property(
+ "FeaturePropertyA",
+ exponential(
+ stop(Color.RED, lineColor(Color.RED))
+ ).withBase(0.5f)
+ )
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getLineColor());
- assertNotNull(layer.getLineColor().getFunction());
- assertEquals(SourceFunction.class, layer.getLineColor().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineColor().getFunction()).getProperty());
- assertEquals(ExponentialStops.class, layer.getLineColor().getFunction().getStops().getClass());
+ // Verify
+ assertNotNull(layer.getLineColor());
+ assertNotNull(layer.getLineColor().getFunction());
+ assertEquals(SourceFunction.class, layer.getLineColor().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineColor().getFunction()).getProperty());
+ assertEquals(ExponentialStops.class, layer.getLineColor().getFunction().getStops().getClass());
+ });
}
@Test
@@ -517,29 +631,32 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-color");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineColor(
- property(
- "FeaturePropertyA",
- categorical(
- stop("valueA", lineColor(Color.RED))
- )
- ).withDefaultValue(lineColor(Color.GREEN))
- )
- );
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineColor(
+ property(
+ "FeaturePropertyA",
+ categorical(
+ stop("valueA", lineColor(Color.RED))
+ )
+ ).withDefaultValue(lineColor(Color.GREEN))
+ )
+ );
+
+ // Verify
+ assertNotNull(layer.getLineColor());
+ assertNotNull(layer.getLineColor().getFunction());
+ assertEquals(SourceFunction.class, layer.getLineColor().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineColor().getFunction()).getProperty());
+ assertEquals(CategoricalStops.class, layer.getLineColor().getFunction().getStops().getClass());
+ assertNotNull(((SourceFunction) layer.getLineColor().getFunction()).getDefaultValue());
+ assertNotNull(((SourceFunction) layer.getLineColor().getFunction()).getDefaultValue().getValue());
+ assertEquals(Color.GREEN, (int) ((SourceFunction) layer.getLineColor().getFunction()).getDefaultValue().getColorInt());
+ });
- // Verify
- assertNotNull(layer.getLineColor());
- assertNotNull(layer.getLineColor().getFunction());
- assertEquals(SourceFunction.class, layer.getLineColor().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineColor().getFunction()).getProperty());
- assertEquals(CategoricalStops.class, layer.getLineColor().getFunction().getStops().getClass());
- assertNotNull(((SourceFunction) layer.getLineColor().getFunction()).getDefaultValue());
- assertNotNull(((SourceFunction) layer.getLineColor().getFunction()).getDefaultValue().getValue());
- assertEquals(Color.GREEN, (int) ((SourceFunction) layer.getLineColor().getFunction()).getDefaultValue().getColorInt());
}
@Test
@@ -547,11 +664,13 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-color");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- layer.setProperties(lineColor(Color.RED));
- assertEquals(layer.getLineColorAsInt(), Color.RED);
+ // Set and Get
+ layer.setProperties(lineColor(Color.RED));
+ assertEquals(layer.getLineColorAsInt(), Color.RED);
+ });
}
@Test
@@ -559,12 +678,14 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-translateTransitionOptions");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- TransitionOptions options = new TransitionOptions(300, 100);
- layer.setLineTranslateTransition(options);
- assertEquals(layer.getLineTranslateTransition(), options);
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setLineTranslateTransition(options);
+ assertEquals(layer.getLineTranslateTransition(), options);
+ });
}
@Test
@@ -572,11 +693,13 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-translate");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- layer.setProperties(lineTranslate(new Float[]{0f,0f}));
- assertEquals((Float[]) layer.getLineTranslate().getValue(), (Float[]) new Float[]{0f,0f});
+ // Set and Get
+ layer.setProperties(lineTranslate(new Float[] {0f, 0f}));
+ assertEquals((Float[]) layer.getLineTranslate().getValue(), (Float[]) new Float[] {0f, 0f});
+ });
}
@Test
@@ -584,26 +707,28 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-translate");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineTranslate(
- zoom(
- exponential(
- stop(2, lineTranslate(new Float[]{0f,0f}))
- ).withBase(0.5f)
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineTranslate(
+ zoom(
+ exponential(
+ stop(2, lineTranslate(new Float[] {0f, 0f}))
+ ).withBase(0.5f)
+ )
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getLineTranslate());
- assertNotNull(layer.getLineTranslate().getFunction());
- assertEquals(CameraFunction.class, layer.getLineTranslate().getFunction().getClass());
- assertEquals(ExponentialStops.class, layer.getLineTranslate().getFunction().getStops().getClass());
- assertEquals(0.5f, ((ExponentialStops) layer.getLineTranslate().getFunction().getStops()).getBase(), 0.001);
- assertEquals(1, ((ExponentialStops) layer.getLineTranslate().getFunction().getStops()).size());
+ // Verify
+ assertNotNull(layer.getLineTranslate());
+ assertNotNull(layer.getLineTranslate().getFunction());
+ assertEquals(CameraFunction.class, layer.getLineTranslate().getFunction().getClass());
+ assertEquals(ExponentialStops.class, layer.getLineTranslate().getFunction().getStops().getClass());
+ assertEquals(0.5f, ((ExponentialStops) layer.getLineTranslate().getFunction().getStops()).getBase(), 0.001);
+ assertEquals(1, ((ExponentialStops) layer.getLineTranslate().getFunction().getStops()).size());
+ });
}
@Test
@@ -611,11 +736,13 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-translate-anchor");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- layer.setProperties(lineTranslateAnchor(LINE_TRANSLATE_ANCHOR_MAP));
- assertEquals((String) layer.getLineTranslateAnchor().getValue(), (String) LINE_TRANSLATE_ANCHOR_MAP);
+ // Set and Get
+ layer.setProperties(lineTranslateAnchor(LINE_TRANSLATE_ANCHOR_MAP));
+ assertEquals((String) layer.getLineTranslateAnchor().getValue(), (String) LINE_TRANSLATE_ANCHOR_MAP);
+ });
}
@Test
@@ -623,25 +750,27 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-translate-anchor");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineTranslateAnchor(
- zoom(
- interval(
- stop(2, lineTranslateAnchor(LINE_TRANSLATE_ANCHOR_MAP))
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineTranslateAnchor(
+ zoom(
+ interval(
+ stop(2, lineTranslateAnchor(LINE_TRANSLATE_ANCHOR_MAP))
+ )
)
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getLineTranslateAnchor());
- assertNotNull(layer.getLineTranslateAnchor().getFunction());
- assertEquals(CameraFunction.class, layer.getLineTranslateAnchor().getFunction().getClass());
- assertEquals(IntervalStops.class, layer.getLineTranslateAnchor().getFunction().getStops().getClass());
- assertEquals(1, ((IntervalStops) layer.getLineTranslateAnchor().getFunction().getStops()).size());
+ // Verify
+ assertNotNull(layer.getLineTranslateAnchor());
+ assertNotNull(layer.getLineTranslateAnchor().getFunction());
+ assertEquals(CameraFunction.class, layer.getLineTranslateAnchor().getFunction().getClass());
+ assertEquals(IntervalStops.class, layer.getLineTranslateAnchor().getFunction().getStops().getClass());
+ assertEquals(1, ((IntervalStops) layer.getLineTranslateAnchor().getFunction().getStops()).size());
+ });
}
@Test
@@ -649,12 +778,14 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-widthTransitionOptions");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- TransitionOptions options = new TransitionOptions(300, 100);
- layer.setLineWidthTransition(options);
- assertEquals(layer.getLineWidthTransition(), options);
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setLineWidthTransition(options);
+ assertEquals(layer.getLineWidthTransition(), options);
+ });
}
@Test
@@ -662,11 +793,13 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-width");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- layer.setProperties(lineWidth(0.3f));
- assertEquals((Float) layer.getLineWidth().getValue(), (Float) 0.3f);
+ // Set and Get
+ layer.setProperties(lineWidth(0.3f));
+ assertEquals((Float) layer.getLineWidth().getValue(), (Float) 0.3f);
+ });
}
@Test
@@ -674,26 +807,28 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-width");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineWidth(
- zoom(
- exponential(
- stop(2, lineWidth(0.3f))
- ).withBase(0.5f)
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineWidth(
+ zoom(
+ exponential(
+ stop(2, lineWidth(0.3f))
+ ).withBase(0.5f)
+ )
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getLineWidth());
- assertNotNull(layer.getLineWidth().getFunction());
- assertEquals(CameraFunction.class, layer.getLineWidth().getFunction().getClass());
- assertEquals(ExponentialStops.class, layer.getLineWidth().getFunction().getStops().getClass());
- assertEquals(0.5f, ((ExponentialStops) layer.getLineWidth().getFunction().getStops()).getBase(), 0.001);
- assertEquals(1, ((ExponentialStops) layer.getLineWidth().getFunction().getStops()).size());
+ // Verify
+ assertNotNull(layer.getLineWidth());
+ assertNotNull(layer.getLineWidth().getFunction());
+ assertEquals(CameraFunction.class, layer.getLineWidth().getFunction().getClass());
+ assertEquals(ExponentialStops.class, layer.getLineWidth().getFunction().getStops().getClass());
+ assertEquals(0.5f, ((ExponentialStops) layer.getLineWidth().getFunction().getStops()).getBase(), 0.001);
+ assertEquals(1, ((ExponentialStops) layer.getLineWidth().getFunction().getStops()).size());
+ });
}
@Test
@@ -701,19 +836,21 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-width");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set
- layer.setProperties(
- lineWidth(property("FeaturePropertyA", Stops.<Float>identity()))
- );
+ // Set
+ layer.setProperties(
+ lineWidth(property("FeaturePropertyA", Stops.<Float>identity()))
+ );
- // Verify
- assertNotNull(layer.getLineWidth());
- assertNotNull(layer.getLineWidth().getFunction());
- assertEquals(SourceFunction.class, layer.getLineWidth().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineWidth().getFunction()).getProperty());
- assertEquals(IdentityStops.class, layer.getLineWidth().getFunction().getStops().getClass());
+ // Verify
+ assertNotNull(layer.getLineWidth());
+ assertNotNull(layer.getLineWidth().getFunction());
+ assertEquals(SourceFunction.class, layer.getLineWidth().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineWidth().getFunction()).getProperty());
+ assertEquals(IdentityStops.class, layer.getLineWidth().getFunction().getStops().getClass());
+ });
}
@Test
@@ -721,26 +858,28 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-width");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineWidth(
- property(
- "FeaturePropertyA",
- exponential(
- stop(0.3f, lineWidth(0.3f))
- ).withBase(0.5f)
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineWidth(
+ property(
+ "FeaturePropertyA",
+ exponential(
+ stop(0.3f, lineWidth(0.3f))
+ ).withBase(0.5f)
+ )
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getLineWidth());
- assertNotNull(layer.getLineWidth().getFunction());
- assertEquals(SourceFunction.class, layer.getLineWidth().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineWidth().getFunction()).getProperty());
- assertEquals(ExponentialStops.class, layer.getLineWidth().getFunction().getStops().getClass());
+ // Verify
+ assertNotNull(layer.getLineWidth());
+ assertNotNull(layer.getLineWidth().getFunction());
+ assertEquals(SourceFunction.class, layer.getLineWidth().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineWidth().getFunction()).getProperty());
+ assertEquals(ExponentialStops.class, layer.getLineWidth().getFunction().getStops().getClass());
+ });
}
@Test
@@ -748,29 +887,32 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-width");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineWidth(
- property(
- "FeaturePropertyA",
- categorical(
- stop(1.0f, lineWidth(0.3f))
- )
- ).withDefaultValue(lineWidth(0.3f))
- )
- );
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineWidth(
+ property(
+ "FeaturePropertyA",
+ categorical(
+ stop(1.0f, lineWidth(0.3f))
+ )
+ ).withDefaultValue(lineWidth(0.3f))
+ )
+ );
+
+ // Verify
+ assertNotNull(layer.getLineWidth());
+ assertNotNull(layer.getLineWidth().getFunction());
+ assertEquals(SourceFunction.class, layer.getLineWidth().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineWidth().getFunction()).getProperty());
+ assertEquals(CategoricalStops.class, layer.getLineWidth().getFunction().getStops().getClass());
+ assertNotNull(((SourceFunction) layer.getLineWidth().getFunction()).getDefaultValue());
+ assertNotNull(((SourceFunction) layer.getLineWidth().getFunction()).getDefaultValue().getValue());
+ assertEquals(0.3f, ((SourceFunction) layer.getLineWidth().getFunction()).getDefaultValue().getValue());
+ });
- // Verify
- assertNotNull(layer.getLineWidth());
- assertNotNull(layer.getLineWidth().getFunction());
- assertEquals(SourceFunction.class, layer.getLineWidth().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineWidth().getFunction()).getProperty());
- assertEquals(CategoricalStops.class, layer.getLineWidth().getFunction().getStops().getClass());
- assertNotNull(((SourceFunction) layer.getLineWidth().getFunction()).getDefaultValue());
- assertNotNull(((SourceFunction) layer.getLineWidth().getFunction()).getDefaultValue().getValue());
- assertEquals(0.3f, ((SourceFunction) layer.getLineWidth().getFunction()).getDefaultValue().getValue());
}
@Test
@@ -778,34 +920,36 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-width");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineWidth(
- composite(
- "FeaturePropertyA",
- exponential(
- stop(0, 0.3f, lineWidth(0.9f))
- ).withBase(0.5f)
- ).withDefaultValue(lineWidth(0.3f))
- )
- );
-
- // Verify
- assertNotNull(layer.getLineWidth());
- assertNotNull(layer.getLineWidth().getFunction());
- assertEquals(CompositeFunction.class, layer.getLineWidth().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((CompositeFunction) layer.getLineWidth().getFunction()).getProperty());
- assertEquals(ExponentialStops.class, layer.getLineWidth().getFunction().getStops().getClass());
- assertEquals(1, ((ExponentialStops) layer.getLineWidth().getFunction().getStops()).size());
-
- ExponentialStops<Stop.CompositeValue<Float, Float>, Float> stops =
- (ExponentialStops<Stop.CompositeValue<Float, Float>, Float>) layer.getLineWidth().getFunction().getStops();
- Stop<Stop.CompositeValue<Float, Float>, Float> stop = stops.iterator().next();
- assertEquals(0f, stop.in.zoom, 0.001);
- assertEquals(0.3f, stop.in.value, 0.001f);
- assertEquals(0.9f, stop.out, 0.001f);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineWidth(
+ composite(
+ "FeaturePropertyA",
+ exponential(
+ stop(0, 0.3f, lineWidth(0.9f))
+ ).withBase(0.5f)
+ ).withDefaultValue(lineWidth(0.3f))
+ )
+ );
+
+ // Verify
+ assertNotNull(layer.getLineWidth());
+ assertNotNull(layer.getLineWidth().getFunction());
+ assertEquals(CompositeFunction.class, layer.getLineWidth().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((CompositeFunction) layer.getLineWidth().getFunction()).getProperty());
+ assertEquals(ExponentialStops.class, layer.getLineWidth().getFunction().getStops().getClass());
+ assertEquals(1, ((ExponentialStops) layer.getLineWidth().getFunction().getStops()).size());
+
+ ExponentialStops<Stop.CompositeValue<Float, Float>, Float> stops =
+ (ExponentialStops<Stop.CompositeValue<Float, Float>, Float>) layer.getLineWidth().getFunction().getStops();
+ Stop<Stop.CompositeValue<Float, Float>, Float> stop = stops.iterator().next();
+ assertEquals(0f, stop.in.zoom, 0.001);
+ assertEquals(0.3f, stop.in.value, 0.001f);
+ assertEquals(0.9f, stop.out, 0.001f);
+ });
}
@Test
@@ -813,12 +957,14 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-gap-widthTransitionOptions");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- TransitionOptions options = new TransitionOptions(300, 100);
- layer.setLineGapWidthTransition(options);
- assertEquals(layer.getLineGapWidthTransition(), options);
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setLineGapWidthTransition(options);
+ assertEquals(layer.getLineGapWidthTransition(), options);
+ });
}
@Test
@@ -826,11 +972,13 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-gap-width");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- layer.setProperties(lineGapWidth(0.3f));
- assertEquals((Float) layer.getLineGapWidth().getValue(), (Float) 0.3f);
+ // Set and Get
+ layer.setProperties(lineGapWidth(0.3f));
+ assertEquals((Float) layer.getLineGapWidth().getValue(), (Float) 0.3f);
+ });
}
@Test
@@ -838,26 +986,28 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-gap-width");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineGapWidth(
- zoom(
- exponential(
- stop(2, lineGapWidth(0.3f))
- ).withBase(0.5f)
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineGapWidth(
+ zoom(
+ exponential(
+ stop(2, lineGapWidth(0.3f))
+ ).withBase(0.5f)
+ )
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getLineGapWidth());
- assertNotNull(layer.getLineGapWidth().getFunction());
- assertEquals(CameraFunction.class, layer.getLineGapWidth().getFunction().getClass());
- assertEquals(ExponentialStops.class, layer.getLineGapWidth().getFunction().getStops().getClass());
- assertEquals(0.5f, ((ExponentialStops) layer.getLineGapWidth().getFunction().getStops()).getBase(), 0.001);
- assertEquals(1, ((ExponentialStops) layer.getLineGapWidth().getFunction().getStops()).size());
+ // Verify
+ assertNotNull(layer.getLineGapWidth());
+ assertNotNull(layer.getLineGapWidth().getFunction());
+ assertEquals(CameraFunction.class, layer.getLineGapWidth().getFunction().getClass());
+ assertEquals(ExponentialStops.class, layer.getLineGapWidth().getFunction().getStops().getClass());
+ assertEquals(0.5f, ((ExponentialStops) layer.getLineGapWidth().getFunction().getStops()).getBase(), 0.001);
+ assertEquals(1, ((ExponentialStops) layer.getLineGapWidth().getFunction().getStops()).size());
+ });
}
@Test
@@ -865,19 +1015,21 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-gap-width");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set
- layer.setProperties(
- lineGapWidth(property("FeaturePropertyA", Stops.<Float>identity()))
- );
+ // Set
+ layer.setProperties(
+ lineGapWidth(property("FeaturePropertyA", Stops.<Float>identity()))
+ );
- // Verify
- assertNotNull(layer.getLineGapWidth());
- assertNotNull(layer.getLineGapWidth().getFunction());
- assertEquals(SourceFunction.class, layer.getLineGapWidth().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineGapWidth().getFunction()).getProperty());
- assertEquals(IdentityStops.class, layer.getLineGapWidth().getFunction().getStops().getClass());
+ // Verify
+ assertNotNull(layer.getLineGapWidth());
+ assertNotNull(layer.getLineGapWidth().getFunction());
+ assertEquals(SourceFunction.class, layer.getLineGapWidth().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineGapWidth().getFunction()).getProperty());
+ assertEquals(IdentityStops.class, layer.getLineGapWidth().getFunction().getStops().getClass());
+ });
}
@Test
@@ -885,26 +1037,28 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-gap-width");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineGapWidth(
- property(
- "FeaturePropertyA",
- exponential(
- stop(0.3f, lineGapWidth(0.3f))
- ).withBase(0.5f)
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineGapWidth(
+ property(
+ "FeaturePropertyA",
+ exponential(
+ stop(0.3f, lineGapWidth(0.3f))
+ ).withBase(0.5f)
+ )
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getLineGapWidth());
- assertNotNull(layer.getLineGapWidth().getFunction());
- assertEquals(SourceFunction.class, layer.getLineGapWidth().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineGapWidth().getFunction()).getProperty());
- assertEquals(ExponentialStops.class, layer.getLineGapWidth().getFunction().getStops().getClass());
+ // Verify
+ assertNotNull(layer.getLineGapWidth());
+ assertNotNull(layer.getLineGapWidth().getFunction());
+ assertEquals(SourceFunction.class, layer.getLineGapWidth().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineGapWidth().getFunction()).getProperty());
+ assertEquals(ExponentialStops.class, layer.getLineGapWidth().getFunction().getStops().getClass());
+ });
}
@Test
@@ -912,29 +1066,32 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-gap-width");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineGapWidth(
- property(
- "FeaturePropertyA",
- categorical(
- stop(1.0f, lineGapWidth(0.3f))
- )
- ).withDefaultValue(lineGapWidth(0.3f))
- )
- );
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineGapWidth(
+ property(
+ "FeaturePropertyA",
+ categorical(
+ stop(1.0f, lineGapWidth(0.3f))
+ )
+ ).withDefaultValue(lineGapWidth(0.3f))
+ )
+ );
+
+ // Verify
+ assertNotNull(layer.getLineGapWidth());
+ assertNotNull(layer.getLineGapWidth().getFunction());
+ assertEquals(SourceFunction.class, layer.getLineGapWidth().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineGapWidth().getFunction()).getProperty());
+ assertEquals(CategoricalStops.class, layer.getLineGapWidth().getFunction().getStops().getClass());
+ assertNotNull(((SourceFunction) layer.getLineGapWidth().getFunction()).getDefaultValue());
+ assertNotNull(((SourceFunction) layer.getLineGapWidth().getFunction()).getDefaultValue().getValue());
+ assertEquals(0.3f, ((SourceFunction) layer.getLineGapWidth().getFunction()).getDefaultValue().getValue());
+ });
- // Verify
- assertNotNull(layer.getLineGapWidth());
- assertNotNull(layer.getLineGapWidth().getFunction());
- assertEquals(SourceFunction.class, layer.getLineGapWidth().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineGapWidth().getFunction()).getProperty());
- assertEquals(CategoricalStops.class, layer.getLineGapWidth().getFunction().getStops().getClass());
- assertNotNull(((SourceFunction) layer.getLineGapWidth().getFunction()).getDefaultValue());
- assertNotNull(((SourceFunction) layer.getLineGapWidth().getFunction()).getDefaultValue().getValue());
- assertEquals(0.3f, ((SourceFunction) layer.getLineGapWidth().getFunction()).getDefaultValue().getValue());
}
@Test
@@ -942,34 +1099,36 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-gap-width");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineGapWidth(
- composite(
- "FeaturePropertyA",
- exponential(
- stop(0, 0.3f, lineGapWidth(0.9f))
- ).withBase(0.5f)
- ).withDefaultValue(lineGapWidth(0.3f))
- )
- );
-
- // Verify
- assertNotNull(layer.getLineGapWidth());
- assertNotNull(layer.getLineGapWidth().getFunction());
- assertEquals(CompositeFunction.class, layer.getLineGapWidth().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((CompositeFunction) layer.getLineGapWidth().getFunction()).getProperty());
- assertEquals(ExponentialStops.class, layer.getLineGapWidth().getFunction().getStops().getClass());
- assertEquals(1, ((ExponentialStops) layer.getLineGapWidth().getFunction().getStops()).size());
-
- ExponentialStops<Stop.CompositeValue<Float, Float>, Float> stops =
- (ExponentialStops<Stop.CompositeValue<Float, Float>, Float>) layer.getLineGapWidth().getFunction().getStops();
- Stop<Stop.CompositeValue<Float, Float>, Float> stop = stops.iterator().next();
- assertEquals(0f, stop.in.zoom, 0.001);
- assertEquals(0.3f, stop.in.value, 0.001f);
- assertEquals(0.9f, stop.out, 0.001f);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineGapWidth(
+ composite(
+ "FeaturePropertyA",
+ exponential(
+ stop(0, 0.3f, lineGapWidth(0.9f))
+ ).withBase(0.5f)
+ ).withDefaultValue(lineGapWidth(0.3f))
+ )
+ );
+
+ // Verify
+ assertNotNull(layer.getLineGapWidth());
+ assertNotNull(layer.getLineGapWidth().getFunction());
+ assertEquals(CompositeFunction.class, layer.getLineGapWidth().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((CompositeFunction) layer.getLineGapWidth().getFunction()).getProperty());
+ assertEquals(ExponentialStops.class, layer.getLineGapWidth().getFunction().getStops().getClass());
+ assertEquals(1, ((ExponentialStops) layer.getLineGapWidth().getFunction().getStops()).size());
+
+ ExponentialStops<Stop.CompositeValue<Float, Float>, Float> stops =
+ (ExponentialStops<Stop.CompositeValue<Float, Float>, Float>) layer.getLineGapWidth().getFunction().getStops();
+ Stop<Stop.CompositeValue<Float, Float>, Float> stop = stops.iterator().next();
+ assertEquals(0f, stop.in.zoom, 0.001);
+ assertEquals(0.3f, stop.in.value, 0.001f);
+ assertEquals(0.9f, stop.out, 0.001f);
+ });
}
@Test
@@ -977,12 +1136,14 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-offsetTransitionOptions");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- TransitionOptions options = new TransitionOptions(300, 100);
- layer.setLineOffsetTransition(options);
- assertEquals(layer.getLineOffsetTransition(), options);
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setLineOffsetTransition(options);
+ assertEquals(layer.getLineOffsetTransition(), options);
+ });
}
@Test
@@ -990,11 +1151,13 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-offset");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- layer.setProperties(lineOffset(0.3f));
- assertEquals((Float) layer.getLineOffset().getValue(), (Float) 0.3f);
+ // Set and Get
+ layer.setProperties(lineOffset(0.3f));
+ assertEquals((Float) layer.getLineOffset().getValue(), (Float) 0.3f);
+ });
}
@Test
@@ -1002,26 +1165,28 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-offset");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineOffset(
- zoom(
- exponential(
- stop(2, lineOffset(0.3f))
- ).withBase(0.5f)
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineOffset(
+ zoom(
+ exponential(
+ stop(2, lineOffset(0.3f))
+ ).withBase(0.5f)
+ )
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getLineOffset());
- assertNotNull(layer.getLineOffset().getFunction());
- assertEquals(CameraFunction.class, layer.getLineOffset().getFunction().getClass());
- assertEquals(ExponentialStops.class, layer.getLineOffset().getFunction().getStops().getClass());
- assertEquals(0.5f, ((ExponentialStops) layer.getLineOffset().getFunction().getStops()).getBase(), 0.001);
- assertEquals(1, ((ExponentialStops) layer.getLineOffset().getFunction().getStops()).size());
+ // Verify
+ assertNotNull(layer.getLineOffset());
+ assertNotNull(layer.getLineOffset().getFunction());
+ assertEquals(CameraFunction.class, layer.getLineOffset().getFunction().getClass());
+ assertEquals(ExponentialStops.class, layer.getLineOffset().getFunction().getStops().getClass());
+ assertEquals(0.5f, ((ExponentialStops) layer.getLineOffset().getFunction().getStops()).getBase(), 0.001);
+ assertEquals(1, ((ExponentialStops) layer.getLineOffset().getFunction().getStops()).size());
+ });
}
@Test
@@ -1029,19 +1194,21 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-offset");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set
- layer.setProperties(
- lineOffset(property("FeaturePropertyA", Stops.<Float>identity()))
- );
+ // Set
+ layer.setProperties(
+ lineOffset(property("FeaturePropertyA", Stops.<Float>identity()))
+ );
- // Verify
- assertNotNull(layer.getLineOffset());
- assertNotNull(layer.getLineOffset().getFunction());
- assertEquals(SourceFunction.class, layer.getLineOffset().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineOffset().getFunction()).getProperty());
- assertEquals(IdentityStops.class, layer.getLineOffset().getFunction().getStops().getClass());
+ // Verify
+ assertNotNull(layer.getLineOffset());
+ assertNotNull(layer.getLineOffset().getFunction());
+ assertEquals(SourceFunction.class, layer.getLineOffset().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineOffset().getFunction()).getProperty());
+ assertEquals(IdentityStops.class, layer.getLineOffset().getFunction().getStops().getClass());
+ });
}
@Test
@@ -1049,26 +1216,28 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-offset");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineOffset(
- property(
- "FeaturePropertyA",
- exponential(
- stop(0.3f, lineOffset(0.3f))
- ).withBase(0.5f)
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineOffset(
+ property(
+ "FeaturePropertyA",
+ exponential(
+ stop(0.3f, lineOffset(0.3f))
+ ).withBase(0.5f)
+ )
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getLineOffset());
- assertNotNull(layer.getLineOffset().getFunction());
- assertEquals(SourceFunction.class, layer.getLineOffset().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineOffset().getFunction()).getProperty());
- assertEquals(ExponentialStops.class, layer.getLineOffset().getFunction().getStops().getClass());
+ // Verify
+ assertNotNull(layer.getLineOffset());
+ assertNotNull(layer.getLineOffset().getFunction());
+ assertEquals(SourceFunction.class, layer.getLineOffset().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineOffset().getFunction()).getProperty());
+ assertEquals(ExponentialStops.class, layer.getLineOffset().getFunction().getStops().getClass());
+ });
}
@Test
@@ -1076,29 +1245,32 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-offset");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineOffset(
- property(
- "FeaturePropertyA",
- categorical(
- stop(1.0f, lineOffset(0.3f))
- )
- ).withDefaultValue(lineOffset(0.3f))
- )
- );
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineOffset(
+ property(
+ "FeaturePropertyA",
+ categorical(
+ stop(1.0f, lineOffset(0.3f))
+ )
+ ).withDefaultValue(lineOffset(0.3f))
+ )
+ );
+
+ // Verify
+ assertNotNull(layer.getLineOffset());
+ assertNotNull(layer.getLineOffset().getFunction());
+ assertEquals(SourceFunction.class, layer.getLineOffset().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineOffset().getFunction()).getProperty());
+ assertEquals(CategoricalStops.class, layer.getLineOffset().getFunction().getStops().getClass());
+ assertNotNull(((SourceFunction) layer.getLineOffset().getFunction()).getDefaultValue());
+ assertNotNull(((SourceFunction) layer.getLineOffset().getFunction()).getDefaultValue().getValue());
+ assertEquals(0.3f, ((SourceFunction) layer.getLineOffset().getFunction()).getDefaultValue().getValue());
+ });
- // Verify
- assertNotNull(layer.getLineOffset());
- assertNotNull(layer.getLineOffset().getFunction());
- assertEquals(SourceFunction.class, layer.getLineOffset().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineOffset().getFunction()).getProperty());
- assertEquals(CategoricalStops.class, layer.getLineOffset().getFunction().getStops().getClass());
- assertNotNull(((SourceFunction) layer.getLineOffset().getFunction()).getDefaultValue());
- assertNotNull(((SourceFunction) layer.getLineOffset().getFunction()).getDefaultValue().getValue());
- assertEquals(0.3f, ((SourceFunction) layer.getLineOffset().getFunction()).getDefaultValue().getValue());
}
@Test
@@ -1106,34 +1278,36 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-offset");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineOffset(
- composite(
- "FeaturePropertyA",
- exponential(
- stop(0, 0.3f, lineOffset(0.9f))
- ).withBase(0.5f)
- ).withDefaultValue(lineOffset(0.3f))
- )
- );
-
- // Verify
- assertNotNull(layer.getLineOffset());
- assertNotNull(layer.getLineOffset().getFunction());
- assertEquals(CompositeFunction.class, layer.getLineOffset().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((CompositeFunction) layer.getLineOffset().getFunction()).getProperty());
- assertEquals(ExponentialStops.class, layer.getLineOffset().getFunction().getStops().getClass());
- assertEquals(1, ((ExponentialStops) layer.getLineOffset().getFunction().getStops()).size());
-
- ExponentialStops<Stop.CompositeValue<Float, Float>, Float> stops =
- (ExponentialStops<Stop.CompositeValue<Float, Float>, Float>) layer.getLineOffset().getFunction().getStops();
- Stop<Stop.CompositeValue<Float, Float>, Float> stop = stops.iterator().next();
- assertEquals(0f, stop.in.zoom, 0.001);
- assertEquals(0.3f, stop.in.value, 0.001f);
- assertEquals(0.9f, stop.out, 0.001f);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineOffset(
+ composite(
+ "FeaturePropertyA",
+ exponential(
+ stop(0, 0.3f, lineOffset(0.9f))
+ ).withBase(0.5f)
+ ).withDefaultValue(lineOffset(0.3f))
+ )
+ );
+
+ // Verify
+ assertNotNull(layer.getLineOffset());
+ assertNotNull(layer.getLineOffset().getFunction());
+ assertEquals(CompositeFunction.class, layer.getLineOffset().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((CompositeFunction) layer.getLineOffset().getFunction()).getProperty());
+ assertEquals(ExponentialStops.class, layer.getLineOffset().getFunction().getStops().getClass());
+ assertEquals(1, ((ExponentialStops) layer.getLineOffset().getFunction().getStops()).size());
+
+ ExponentialStops<Stop.CompositeValue<Float, Float>, Float> stops =
+ (ExponentialStops<Stop.CompositeValue<Float, Float>, Float>) layer.getLineOffset().getFunction().getStops();
+ Stop<Stop.CompositeValue<Float, Float>, Float> stop = stops.iterator().next();
+ assertEquals(0f, stop.in.zoom, 0.001);
+ assertEquals(0.3f, stop.in.value, 0.001f);
+ assertEquals(0.9f, stop.out, 0.001f);
+ });
}
@Test
@@ -1141,12 +1315,14 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-blurTransitionOptions");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- TransitionOptions options = new TransitionOptions(300, 100);
- layer.setLineBlurTransition(options);
- assertEquals(layer.getLineBlurTransition(), options);
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setLineBlurTransition(options);
+ assertEquals(layer.getLineBlurTransition(), options);
+ });
}
@Test
@@ -1154,11 +1330,13 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-blur");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- layer.setProperties(lineBlur(0.3f));
- assertEquals((Float) layer.getLineBlur().getValue(), (Float) 0.3f);
+ // Set and Get
+ layer.setProperties(lineBlur(0.3f));
+ assertEquals((Float) layer.getLineBlur().getValue(), (Float) 0.3f);
+ });
}
@Test
@@ -1166,26 +1344,28 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-blur");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineBlur(
- zoom(
- exponential(
- stop(2, lineBlur(0.3f))
- ).withBase(0.5f)
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineBlur(
+ zoom(
+ exponential(
+ stop(2, lineBlur(0.3f))
+ ).withBase(0.5f)
+ )
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getLineBlur());
- assertNotNull(layer.getLineBlur().getFunction());
- assertEquals(CameraFunction.class, layer.getLineBlur().getFunction().getClass());
- assertEquals(ExponentialStops.class, layer.getLineBlur().getFunction().getStops().getClass());
- assertEquals(0.5f, ((ExponentialStops) layer.getLineBlur().getFunction().getStops()).getBase(), 0.001);
- assertEquals(1, ((ExponentialStops) layer.getLineBlur().getFunction().getStops()).size());
+ // Verify
+ assertNotNull(layer.getLineBlur());
+ assertNotNull(layer.getLineBlur().getFunction());
+ assertEquals(CameraFunction.class, layer.getLineBlur().getFunction().getClass());
+ assertEquals(ExponentialStops.class, layer.getLineBlur().getFunction().getStops().getClass());
+ assertEquals(0.5f, ((ExponentialStops) layer.getLineBlur().getFunction().getStops()).getBase(), 0.001);
+ assertEquals(1, ((ExponentialStops) layer.getLineBlur().getFunction().getStops()).size());
+ });
}
@Test
@@ -1193,19 +1373,21 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-blur");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set
- layer.setProperties(
- lineBlur(property("FeaturePropertyA", Stops.<Float>identity()))
- );
+ // Set
+ layer.setProperties(
+ lineBlur(property("FeaturePropertyA", Stops.<Float>identity()))
+ );
- // Verify
- assertNotNull(layer.getLineBlur());
- assertNotNull(layer.getLineBlur().getFunction());
- assertEquals(SourceFunction.class, layer.getLineBlur().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineBlur().getFunction()).getProperty());
- assertEquals(IdentityStops.class, layer.getLineBlur().getFunction().getStops().getClass());
+ // Verify
+ assertNotNull(layer.getLineBlur());
+ assertNotNull(layer.getLineBlur().getFunction());
+ assertEquals(SourceFunction.class, layer.getLineBlur().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineBlur().getFunction()).getProperty());
+ assertEquals(IdentityStops.class, layer.getLineBlur().getFunction().getStops().getClass());
+ });
}
@Test
@@ -1213,26 +1395,28 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-blur");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineBlur(
- property(
- "FeaturePropertyA",
- exponential(
- stop(0.3f, lineBlur(0.3f))
- ).withBase(0.5f)
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineBlur(
+ property(
+ "FeaturePropertyA",
+ exponential(
+ stop(0.3f, lineBlur(0.3f))
+ ).withBase(0.5f)
+ )
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getLineBlur());
- assertNotNull(layer.getLineBlur().getFunction());
- assertEquals(SourceFunction.class, layer.getLineBlur().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineBlur().getFunction()).getProperty());
- assertEquals(ExponentialStops.class, layer.getLineBlur().getFunction().getStops().getClass());
+ // Verify
+ assertNotNull(layer.getLineBlur());
+ assertNotNull(layer.getLineBlur().getFunction());
+ assertEquals(SourceFunction.class, layer.getLineBlur().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineBlur().getFunction()).getProperty());
+ assertEquals(ExponentialStops.class, layer.getLineBlur().getFunction().getStops().getClass());
+ });
}
@Test
@@ -1240,29 +1424,32 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-blur");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineBlur(
- property(
- "FeaturePropertyA",
- categorical(
- stop(1.0f, lineBlur(0.3f))
- )
- ).withDefaultValue(lineBlur(0.3f))
- )
- );
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineBlur(
+ property(
+ "FeaturePropertyA",
+ categorical(
+ stop(1.0f, lineBlur(0.3f))
+ )
+ ).withDefaultValue(lineBlur(0.3f))
+ )
+ );
+
+ // Verify
+ assertNotNull(layer.getLineBlur());
+ assertNotNull(layer.getLineBlur().getFunction());
+ assertEquals(SourceFunction.class, layer.getLineBlur().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineBlur().getFunction()).getProperty());
+ assertEquals(CategoricalStops.class, layer.getLineBlur().getFunction().getStops().getClass());
+ assertNotNull(((SourceFunction) layer.getLineBlur().getFunction()).getDefaultValue());
+ assertNotNull(((SourceFunction) layer.getLineBlur().getFunction()).getDefaultValue().getValue());
+ assertEquals(0.3f, ((SourceFunction) layer.getLineBlur().getFunction()).getDefaultValue().getValue());
+ });
- // Verify
- assertNotNull(layer.getLineBlur());
- assertNotNull(layer.getLineBlur().getFunction());
- assertEquals(SourceFunction.class, layer.getLineBlur().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getLineBlur().getFunction()).getProperty());
- assertEquals(CategoricalStops.class, layer.getLineBlur().getFunction().getStops().getClass());
- assertNotNull(((SourceFunction) layer.getLineBlur().getFunction()).getDefaultValue());
- assertNotNull(((SourceFunction) layer.getLineBlur().getFunction()).getDefaultValue().getValue());
- assertEquals(0.3f, ((SourceFunction) layer.getLineBlur().getFunction()).getDefaultValue().getValue());
}
@Test
@@ -1270,34 +1457,36 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-blur");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineBlur(
- composite(
- "FeaturePropertyA",
- exponential(
- stop(0, 0.3f, lineBlur(0.9f))
- ).withBase(0.5f)
- ).withDefaultValue(lineBlur(0.3f))
- )
- );
-
- // Verify
- assertNotNull(layer.getLineBlur());
- assertNotNull(layer.getLineBlur().getFunction());
- assertEquals(CompositeFunction.class, layer.getLineBlur().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((CompositeFunction) layer.getLineBlur().getFunction()).getProperty());
- assertEquals(ExponentialStops.class, layer.getLineBlur().getFunction().getStops().getClass());
- assertEquals(1, ((ExponentialStops) layer.getLineBlur().getFunction().getStops()).size());
-
- ExponentialStops<Stop.CompositeValue<Float, Float>, Float> stops =
- (ExponentialStops<Stop.CompositeValue<Float, Float>, Float>) layer.getLineBlur().getFunction().getStops();
- Stop<Stop.CompositeValue<Float, Float>, Float> stop = stops.iterator().next();
- assertEquals(0f, stop.in.zoom, 0.001);
- assertEquals(0.3f, stop.in.value, 0.001f);
- assertEquals(0.9f, stop.out, 0.001f);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineBlur(
+ composite(
+ "FeaturePropertyA",
+ exponential(
+ stop(0, 0.3f, lineBlur(0.9f))
+ ).withBase(0.5f)
+ ).withDefaultValue(lineBlur(0.3f))
+ )
+ );
+
+ // Verify
+ assertNotNull(layer.getLineBlur());
+ assertNotNull(layer.getLineBlur().getFunction());
+ assertEquals(CompositeFunction.class, layer.getLineBlur().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((CompositeFunction) layer.getLineBlur().getFunction()).getProperty());
+ assertEquals(ExponentialStops.class, layer.getLineBlur().getFunction().getStops().getClass());
+ assertEquals(1, ((ExponentialStops) layer.getLineBlur().getFunction().getStops()).size());
+
+ ExponentialStops<Stop.CompositeValue<Float, Float>, Float> stops =
+ (ExponentialStops<Stop.CompositeValue<Float, Float>, Float>) layer.getLineBlur().getFunction().getStops();
+ Stop<Stop.CompositeValue<Float, Float>, Float> stop = stops.iterator().next();
+ assertEquals(0f, stop.in.zoom, 0.001);
+ assertEquals(0.3f, stop.in.value, 0.001f);
+ assertEquals(0.9f, stop.out, 0.001f);
+ });
}
@Test
@@ -1305,12 +1494,14 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-dasharrayTransitionOptions");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- TransitionOptions options = new TransitionOptions(300, 100);
- layer.setLineDasharrayTransition(options);
- assertEquals(layer.getLineDasharrayTransition(), options);
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setLineDasharrayTransition(options);
+ assertEquals(layer.getLineDasharrayTransition(), options);
+ });
}
@Test
@@ -1318,11 +1509,13 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-dasharray");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- layer.setProperties(lineDasharray(new Float[]{}));
- assertEquals((Float[]) layer.getLineDasharray().getValue(), (Float[]) new Float[]{});
+ // Set and Get
+ layer.setProperties(lineDasharray(new Float[] {}));
+ assertEquals((Float[]) layer.getLineDasharray().getValue(), (Float[]) new Float[] {});
+ });
}
@Test
@@ -1330,25 +1523,27 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-dasharray");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- lineDasharray(
- zoom(
- interval(
- stop(2, lineDasharray(new Float[]{}))
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ lineDasharray(
+ zoom(
+ interval(
+ stop(2, lineDasharray(new Float[] {}))
+ )
)
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getLineDasharray());
- assertNotNull(layer.getLineDasharray().getFunction());
- assertEquals(CameraFunction.class, layer.getLineDasharray().getFunction().getClass());
- assertEquals(IntervalStops.class, layer.getLineDasharray().getFunction().getStops().getClass());
- assertEquals(1, ((IntervalStops) layer.getLineDasharray().getFunction().getStops()).size());
+ // Verify
+ assertNotNull(layer.getLineDasharray());
+ assertNotNull(layer.getLineDasharray().getFunction());
+ assertEquals(CameraFunction.class, layer.getLineDasharray().getFunction().getClass());
+ assertEquals(IntervalStops.class, layer.getLineDasharray().getFunction().getStops().getClass());
+ assertEquals(1, ((IntervalStops) layer.getLineDasharray().getFunction().getStops()).size());
+ });
}
@Test
@@ -1356,12 +1551,14 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-patternTransitionOptions");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- TransitionOptions options = new TransitionOptions(300, 100);
- layer.setLinePatternTransition(options);
- assertEquals(layer.getLinePatternTransition(), options);
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setLinePatternTransition(options);
+ assertEquals(layer.getLinePatternTransition(), options);
+ });
}
@Test
@@ -1369,11 +1566,13 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-pattern");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- layer.setProperties(linePattern("pedestrian-polygon"));
- assertEquals((String) layer.getLinePattern().getValue(), (String) "pedestrian-polygon");
+ // Set and Get
+ layer.setProperties(linePattern("pedestrian-polygon"));
+ assertEquals((String) layer.getLinePattern().getValue(), (String) "pedestrian-polygon");
+ });
}
@Test
@@ -1381,25 +1580,27 @@ public class LineLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("line-pattern");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- linePattern(
- zoom(
- interval(
- stop(2, linePattern("pedestrian-polygon"))
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ linePattern(
+ zoom(
+ interval(
+ stop(2, linePattern("pedestrian-polygon"))
+ )
)
)
- )
- );
-
- // Verify
- assertNotNull(layer.getLinePattern());
- assertNotNull(layer.getLinePattern().getFunction());
- assertEquals(CameraFunction.class, layer.getLinePattern().getFunction().getClass());
- assertEquals(IntervalStops.class, layer.getLinePattern().getFunction().getStops().getClass());
- assertEquals(1, ((IntervalStops) layer.getLinePattern().getFunction().getStops()).size());
+ );
+
+ // Verify
+ assertNotNull(layer.getLinePattern());
+ assertNotNull(layer.getLinePattern().getFunction());
+ assertEquals(CameraFunction.class, layer.getLinePattern().getFunction().getClass());
+ assertEquals(IntervalStops.class, layer.getLinePattern().getFunction().getStops().getClass());
+ assertEquals(1, ((IntervalStops) layer.getLinePattern().getFunction().getStops()).size());
+ });
}
}