summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/FillLayerTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/FillLayerTest.java')
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/FillLayerTest.java886
1 files changed, 482 insertions, 404 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/FillLayerTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/FillLayerTest.java
index b6b6578839..a5e7ea5fc9 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/FillLayerTest.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/FillLayerTest.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,36 @@ 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.FillLayer;
-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.FILL_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.fillAntialias;
+import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.fillColor;
+import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.fillOpacity;
+import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.fillOutlineColor;
+import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.fillPattern;
+import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.fillTranslate;
+import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.fillTranslateAnchor;
+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 FillLayer
@@ -53,15 +59,18 @@ public class FillLayerTest extends BaseActivityTest {
return EspressoTestActivity.class;
}
- private void setupLayer(){
- if ((layer = mapboxMap.getLayerAs("my-layer")) == null) {
- Timber.i("Adding layer");
- layer = new FillLayer("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 FillLayer("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 +78,16 @@ public class FillLayerTest 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 +95,17 @@ public class FillLayerTest 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 +113,13 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-antialias");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- layer.setProperties(fillAntialias(true));
- assertEquals((Boolean) layer.getFillAntialias().getValue(), (Boolean) true);
+ // Set and Get
+ layer.setProperties(fillAntialias(true));
+ assertEquals((Boolean) layer.getFillAntialias().getValue(), (Boolean) true);
+ });
}
@Test
@@ -112,25 +127,27 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-antialias");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- fillAntialias(
- zoom(
- interval(
- stop(2, fillAntialias(true))
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ fillAntialias(
+ zoom(
+ interval(
+ stop(2, fillAntialias(true))
+ )
)
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getFillAntialias());
- assertNotNull(layer.getFillAntialias().getFunction());
- assertEquals(CameraFunction.class, layer.getFillAntialias().getFunction().getClass());
- assertEquals(IntervalStops.class, layer.getFillAntialias().getFunction().getStops().getClass());
- assertEquals(1, ((IntervalStops) layer.getFillAntialias().getFunction().getStops()).size());
+ // Verify
+ assertNotNull(layer.getFillAntialias());
+ assertNotNull(layer.getFillAntialias().getFunction());
+ assertEquals(CameraFunction.class, layer.getFillAntialias().getFunction().getClass());
+ assertEquals(IntervalStops.class, layer.getFillAntialias().getFunction().getStops().getClass());
+ assertEquals(1, ((IntervalStops) layer.getFillAntialias().getFunction().getStops()).size());
+ });
}
@Test
@@ -138,12 +155,14 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-opacityTransitionOptions");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- TransitionOptions options = new TransitionOptions(300, 100);
- layer.setFillOpacityTransition(options);
- assertEquals(layer.getFillOpacityTransition(), options);
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setFillOpacityTransition(options);
+ assertEquals(layer.getFillOpacityTransition(), options);
+ });
}
@Test
@@ -151,11 +170,13 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-opacity");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- layer.setProperties(fillOpacity(0.3f));
- assertEquals((Float) layer.getFillOpacity().getValue(), (Float) 0.3f);
+ // Set and Get
+ layer.setProperties(fillOpacity(0.3f));
+ assertEquals((Float) layer.getFillOpacity().getValue(), (Float) 0.3f);
+ });
}
@Test
@@ -163,26 +184,28 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-opacity");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- fillOpacity(
- zoom(
- exponential(
- stop(2, fillOpacity(0.3f))
- ).withBase(0.5f)
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ fillOpacity(
+ zoom(
+ exponential(
+ stop(2, fillOpacity(0.3f))
+ ).withBase(0.5f)
+ )
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getFillOpacity());
- assertNotNull(layer.getFillOpacity().getFunction());
- assertEquals(CameraFunction.class, layer.getFillOpacity().getFunction().getClass());
- assertEquals(ExponentialStops.class, layer.getFillOpacity().getFunction().getStops().getClass());
- assertEquals(0.5f, ((ExponentialStops) layer.getFillOpacity().getFunction().getStops()).getBase(), 0.001);
- assertEquals(1, ((ExponentialStops) layer.getFillOpacity().getFunction().getStops()).size());
+ // Verify
+ assertNotNull(layer.getFillOpacity());
+ assertNotNull(layer.getFillOpacity().getFunction());
+ assertEquals(CameraFunction.class, layer.getFillOpacity().getFunction().getClass());
+ assertEquals(ExponentialStops.class, layer.getFillOpacity().getFunction().getStops().getClass());
+ assertEquals(0.5f, ((ExponentialStops) layer.getFillOpacity().getFunction().getStops()).getBase(), 0.001);
+ assertEquals(1, ((ExponentialStops) layer.getFillOpacity().getFunction().getStops()).size());
+ });
}
@Test
@@ -190,19 +213,21 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-opacity");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set
- layer.setProperties(
- fillOpacity(property("FeaturePropertyA", Stops.<Float>identity()))
- );
+ // Set
+ layer.setProperties(
+ fillOpacity(property("FeaturePropertyA", Stops.<Float>identity()))
+ );
- // Verify
- assertNotNull(layer.getFillOpacity());
- assertNotNull(layer.getFillOpacity().getFunction());
- assertEquals(SourceFunction.class, layer.getFillOpacity().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getFillOpacity().getFunction()).getProperty());
- assertEquals(IdentityStops.class, layer.getFillOpacity().getFunction().getStops().getClass());
+ // Verify
+ assertNotNull(layer.getFillOpacity());
+ assertNotNull(layer.getFillOpacity().getFunction());
+ assertEquals(SourceFunction.class, layer.getFillOpacity().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getFillOpacity().getFunction()).getProperty());
+ assertEquals(IdentityStops.class, layer.getFillOpacity().getFunction().getStops().getClass());
+ });
}
@Test
@@ -210,26 +235,28 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-opacity");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- fillOpacity(
- property(
- "FeaturePropertyA",
- exponential(
- stop(0.3f, fillOpacity(0.3f))
- ).withBase(0.5f)
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ fillOpacity(
+ property(
+ "FeaturePropertyA",
+ exponential(
+ stop(0.3f, fillOpacity(0.3f))
+ ).withBase(0.5f)
+ )
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getFillOpacity());
- assertNotNull(layer.getFillOpacity().getFunction());
- assertEquals(SourceFunction.class, layer.getFillOpacity().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getFillOpacity().getFunction()).getProperty());
- assertEquals(ExponentialStops.class, layer.getFillOpacity().getFunction().getStops().getClass());
+ // Verify
+ assertNotNull(layer.getFillOpacity());
+ assertNotNull(layer.getFillOpacity().getFunction());
+ assertEquals(SourceFunction.class, layer.getFillOpacity().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getFillOpacity().getFunction()).getProperty());
+ assertEquals(ExponentialStops.class, layer.getFillOpacity().getFunction().getStops().getClass());
+ });
}
@Test
@@ -237,29 +264,32 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-opacity");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- fillOpacity(
- property(
- "FeaturePropertyA",
- categorical(
- stop(1.0f, fillOpacity(0.3f))
- )
- ).withDefaultValue(fillOpacity(0.3f))
- )
- );
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ fillOpacity(
+ property(
+ "FeaturePropertyA",
+ categorical(
+ stop(1.0f, fillOpacity(0.3f))
+ )
+ ).withDefaultValue(fillOpacity(0.3f))
+ )
+ );
+
+ // Verify
+ assertNotNull(layer.getFillOpacity());
+ assertNotNull(layer.getFillOpacity().getFunction());
+ assertEquals(SourceFunction.class, layer.getFillOpacity().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getFillOpacity().getFunction()).getProperty());
+ assertEquals(CategoricalStops.class, layer.getFillOpacity().getFunction().getStops().getClass());
+ assertNotNull(((SourceFunction) layer.getFillOpacity().getFunction()).getDefaultValue());
+ assertNotNull(((SourceFunction) layer.getFillOpacity().getFunction()).getDefaultValue().getValue());
+ assertEquals(0.3f, ((SourceFunction) layer.getFillOpacity().getFunction()).getDefaultValue().getValue());
+ });
- // Verify
- assertNotNull(layer.getFillOpacity());
- assertNotNull(layer.getFillOpacity().getFunction());
- assertEquals(SourceFunction.class, layer.getFillOpacity().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getFillOpacity().getFunction()).getProperty());
- assertEquals(CategoricalStops.class, layer.getFillOpacity().getFunction().getStops().getClass());
- assertNotNull(((SourceFunction) layer.getFillOpacity().getFunction()).getDefaultValue());
- assertNotNull(((SourceFunction) layer.getFillOpacity().getFunction()).getDefaultValue().getValue());
- assertEquals(0.3f, ((SourceFunction) layer.getFillOpacity().getFunction()).getDefaultValue().getValue());
}
@Test
@@ -267,34 +297,36 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-opacity");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- fillOpacity(
- composite(
- "FeaturePropertyA",
- exponential(
- stop(0, 0.3f, fillOpacity(0.9f))
- ).withBase(0.5f)
- ).withDefaultValue(fillOpacity(0.3f))
- )
- );
-
- // Verify
- assertNotNull(layer.getFillOpacity());
- assertNotNull(layer.getFillOpacity().getFunction());
- assertEquals(CompositeFunction.class, layer.getFillOpacity().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((CompositeFunction) layer.getFillOpacity().getFunction()).getProperty());
- assertEquals(ExponentialStops.class, layer.getFillOpacity().getFunction().getStops().getClass());
- assertEquals(1, ((ExponentialStops) layer.getFillOpacity().getFunction().getStops()).size());
-
- ExponentialStops<Stop.CompositeValue<Float, Float>, Float> stops =
- (ExponentialStops<Stop.CompositeValue<Float, Float>, Float>) layer.getFillOpacity().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(
+ fillOpacity(
+ composite(
+ "FeaturePropertyA",
+ exponential(
+ stop(0, 0.3f, fillOpacity(0.9f))
+ ).withBase(0.5f)
+ ).withDefaultValue(fillOpacity(0.3f))
+ )
+ );
+
+ // Verify
+ assertNotNull(layer.getFillOpacity());
+ assertNotNull(layer.getFillOpacity().getFunction());
+ assertEquals(CompositeFunction.class, layer.getFillOpacity().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((CompositeFunction) layer.getFillOpacity().getFunction()).getProperty());
+ assertEquals(ExponentialStops.class, layer.getFillOpacity().getFunction().getStops().getClass());
+ assertEquals(1, ((ExponentialStops) layer.getFillOpacity().getFunction().getStops()).size());
+
+ ExponentialStops<Stop.CompositeValue<Float, Float>, Float> stops =
+ (ExponentialStops<Stop.CompositeValue<Float, Float>, Float>) layer.getFillOpacity().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
@@ -302,12 +334,14 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-colorTransitionOptions");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- TransitionOptions options = new TransitionOptions(300, 100);
- layer.setFillColorTransition(options);
- assertEquals(layer.getFillColorTransition(), options);
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setFillColorTransition(options);
+ assertEquals(layer.getFillColorTransition(), options);
+ });
}
@Test
@@ -315,11 +349,13 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-color");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- layer.setProperties(fillColor("rgba(0, 0, 0, 1)"));
- assertEquals((String) layer.getFillColor().getValue(), (String) "rgba(0, 0, 0, 1)");
+ // Set and Get
+ layer.setProperties(fillColor("rgba(0, 0, 0, 1)"));
+ assertEquals((String) layer.getFillColor().getValue(), (String) "rgba(0, 0, 0, 1)");
+ });
}
@Test
@@ -327,26 +363,28 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-color");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- fillColor(
- zoom(
- exponential(
- stop(2, fillColor("rgba(0, 0, 0, 1)"))
- ).withBase(0.5f)
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ fillColor(
+ zoom(
+ exponential(
+ stop(2, fillColor("rgba(0, 0, 0, 1)"))
+ ).withBase(0.5f)
+ )
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getFillColor());
- assertNotNull(layer.getFillColor().getFunction());
- assertEquals(CameraFunction.class, layer.getFillColor().getFunction().getClass());
- assertEquals(ExponentialStops.class, layer.getFillColor().getFunction().getStops().getClass());
- assertEquals(0.5f, ((ExponentialStops) layer.getFillColor().getFunction().getStops()).getBase(), 0.001);
- assertEquals(1, ((ExponentialStops) layer.getFillColor().getFunction().getStops()).size());
+ // Verify
+ assertNotNull(layer.getFillColor());
+ assertNotNull(layer.getFillColor().getFunction());
+ assertEquals(CameraFunction.class, layer.getFillColor().getFunction().getClass());
+ assertEquals(ExponentialStops.class, layer.getFillColor().getFunction().getStops().getClass());
+ assertEquals(0.5f, ((ExponentialStops) layer.getFillColor().getFunction().getStops()).getBase(), 0.001);
+ assertEquals(1, ((ExponentialStops) layer.getFillColor().getFunction().getStops()).size());
+ });
}
@Test
@@ -354,19 +392,21 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-color");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set
- layer.setProperties(
- fillColor(property("FeaturePropertyA", Stops.<String>identity()))
- );
+ // Set
+ layer.setProperties(
+ fillColor(property("FeaturePropertyA", Stops.<String>identity()))
+ );
- // Verify
- assertNotNull(layer.getFillColor());
- assertNotNull(layer.getFillColor().getFunction());
- assertEquals(SourceFunction.class, layer.getFillColor().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getFillColor().getFunction()).getProperty());
- assertEquals(IdentityStops.class, layer.getFillColor().getFunction().getStops().getClass());
+ // Verify
+ assertNotNull(layer.getFillColor());
+ assertNotNull(layer.getFillColor().getFunction());
+ assertEquals(SourceFunction.class, layer.getFillColor().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getFillColor().getFunction()).getProperty());
+ assertEquals(IdentityStops.class, layer.getFillColor().getFunction().getStops().getClass());
+ });
}
@Test
@@ -374,26 +414,28 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-color");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- fillColor(
- property(
- "FeaturePropertyA",
- exponential(
- stop(Color.RED, fillColor(Color.RED))
- ).withBase(0.5f)
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ fillColor(
+ property(
+ "FeaturePropertyA",
+ exponential(
+ stop(Color.RED, fillColor(Color.RED))
+ ).withBase(0.5f)
+ )
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getFillColor());
- assertNotNull(layer.getFillColor().getFunction());
- assertEquals(SourceFunction.class, layer.getFillColor().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getFillColor().getFunction()).getProperty());
- assertEquals(ExponentialStops.class, layer.getFillColor().getFunction().getStops().getClass());
+ // Verify
+ assertNotNull(layer.getFillColor());
+ assertNotNull(layer.getFillColor().getFunction());
+ assertEquals(SourceFunction.class, layer.getFillColor().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getFillColor().getFunction()).getProperty());
+ assertEquals(ExponentialStops.class, layer.getFillColor().getFunction().getStops().getClass());
+ });
}
@Test
@@ -401,29 +443,32 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-color");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- fillColor(
- property(
- "FeaturePropertyA",
- categorical(
- stop("valueA", fillColor(Color.RED))
- )
- ).withDefaultValue(fillColor(Color.GREEN))
- )
- );
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ fillColor(
+ property(
+ "FeaturePropertyA",
+ categorical(
+ stop("valueA", fillColor(Color.RED))
+ )
+ ).withDefaultValue(fillColor(Color.GREEN))
+ )
+ );
+
+ // Verify
+ assertNotNull(layer.getFillColor());
+ assertNotNull(layer.getFillColor().getFunction());
+ assertEquals(SourceFunction.class, layer.getFillColor().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getFillColor().getFunction()).getProperty());
+ assertEquals(CategoricalStops.class, layer.getFillColor().getFunction().getStops().getClass());
+ assertNotNull(((SourceFunction) layer.getFillColor().getFunction()).getDefaultValue());
+ assertNotNull(((SourceFunction) layer.getFillColor().getFunction()).getDefaultValue().getValue());
+ assertEquals(Color.GREEN, (int) ((SourceFunction) layer.getFillColor().getFunction()).getDefaultValue().getColorInt());
+ });
- // Verify
- assertNotNull(layer.getFillColor());
- assertNotNull(layer.getFillColor().getFunction());
- assertEquals(SourceFunction.class, layer.getFillColor().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getFillColor().getFunction()).getProperty());
- assertEquals(CategoricalStops.class, layer.getFillColor().getFunction().getStops().getClass());
- assertNotNull(((SourceFunction) layer.getFillColor().getFunction()).getDefaultValue());
- assertNotNull(((SourceFunction) layer.getFillColor().getFunction()).getDefaultValue().getValue());
- assertEquals(Color.GREEN, (int) ((SourceFunction) layer.getFillColor().getFunction()).getDefaultValue().getColorInt());
}
@Test
@@ -431,11 +476,13 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-color");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- layer.setProperties(fillColor(Color.RED));
- assertEquals(layer.getFillColorAsInt(), Color.RED);
+ // Set and Get
+ layer.setProperties(fillColor(Color.RED));
+ assertEquals(layer.getFillColorAsInt(), Color.RED);
+ });
}
@Test
@@ -443,12 +490,14 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-outline-colorTransitionOptions");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- TransitionOptions options = new TransitionOptions(300, 100);
- layer.setFillOutlineColorTransition(options);
- assertEquals(layer.getFillOutlineColorTransition(), options);
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setFillOutlineColorTransition(options);
+ assertEquals(layer.getFillOutlineColorTransition(), options);
+ });
}
@Test
@@ -456,11 +505,13 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-outline-color");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- layer.setProperties(fillOutlineColor("rgba(0, 0, 0, 1)"));
- assertEquals((String) layer.getFillOutlineColor().getValue(), (String) "rgba(0, 0, 0, 1)");
+ // Set and Get
+ layer.setProperties(fillOutlineColor("rgba(0, 0, 0, 1)"));
+ assertEquals((String) layer.getFillOutlineColor().getValue(), (String) "rgba(0, 0, 0, 1)");
+ });
}
@Test
@@ -468,26 +519,28 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-outline-color");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- fillOutlineColor(
- zoom(
- exponential(
- stop(2, fillOutlineColor("rgba(0, 0, 0, 1)"))
- ).withBase(0.5f)
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ fillOutlineColor(
+ zoom(
+ exponential(
+ stop(2, fillOutlineColor("rgba(0, 0, 0, 1)"))
+ ).withBase(0.5f)
+ )
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getFillOutlineColor());
- assertNotNull(layer.getFillOutlineColor().getFunction());
- assertEquals(CameraFunction.class, layer.getFillOutlineColor().getFunction().getClass());
- assertEquals(ExponentialStops.class, layer.getFillOutlineColor().getFunction().getStops().getClass());
- assertEquals(0.5f, ((ExponentialStops) layer.getFillOutlineColor().getFunction().getStops()).getBase(), 0.001);
- assertEquals(1, ((ExponentialStops) layer.getFillOutlineColor().getFunction().getStops()).size());
+ // Verify
+ assertNotNull(layer.getFillOutlineColor());
+ assertNotNull(layer.getFillOutlineColor().getFunction());
+ assertEquals(CameraFunction.class, layer.getFillOutlineColor().getFunction().getClass());
+ assertEquals(ExponentialStops.class, layer.getFillOutlineColor().getFunction().getStops().getClass());
+ assertEquals(0.5f, ((ExponentialStops) layer.getFillOutlineColor().getFunction().getStops()).getBase(), 0.001);
+ assertEquals(1, ((ExponentialStops) layer.getFillOutlineColor().getFunction().getStops()).size());
+ });
}
@Test
@@ -495,19 +548,21 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-outline-color");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set
- layer.setProperties(
- fillOutlineColor(property("FeaturePropertyA", Stops.<String>identity()))
- );
+ // Set
+ layer.setProperties(
+ fillOutlineColor(property("FeaturePropertyA", Stops.<String>identity()))
+ );
- // Verify
- assertNotNull(layer.getFillOutlineColor());
- assertNotNull(layer.getFillOutlineColor().getFunction());
- assertEquals(SourceFunction.class, layer.getFillOutlineColor().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getFillOutlineColor().getFunction()).getProperty());
- assertEquals(IdentityStops.class, layer.getFillOutlineColor().getFunction().getStops().getClass());
+ // Verify
+ assertNotNull(layer.getFillOutlineColor());
+ assertNotNull(layer.getFillOutlineColor().getFunction());
+ assertEquals(SourceFunction.class, layer.getFillOutlineColor().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getFillOutlineColor().getFunction()).getProperty());
+ assertEquals(IdentityStops.class, layer.getFillOutlineColor().getFunction().getStops().getClass());
+ });
}
@Test
@@ -515,26 +570,28 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-outline-color");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- fillOutlineColor(
- property(
- "FeaturePropertyA",
- exponential(
- stop(Color.RED, fillOutlineColor(Color.RED))
- ).withBase(0.5f)
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ fillOutlineColor(
+ property(
+ "FeaturePropertyA",
+ exponential(
+ stop(Color.RED, fillOutlineColor(Color.RED))
+ ).withBase(0.5f)
+ )
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getFillOutlineColor());
- assertNotNull(layer.getFillOutlineColor().getFunction());
- assertEquals(SourceFunction.class, layer.getFillOutlineColor().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getFillOutlineColor().getFunction()).getProperty());
- assertEquals(ExponentialStops.class, layer.getFillOutlineColor().getFunction().getStops().getClass());
+ // Verify
+ assertNotNull(layer.getFillOutlineColor());
+ assertNotNull(layer.getFillOutlineColor().getFunction());
+ assertEquals(SourceFunction.class, layer.getFillOutlineColor().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getFillOutlineColor().getFunction()).getProperty());
+ assertEquals(ExponentialStops.class, layer.getFillOutlineColor().getFunction().getStops().getClass());
+ });
}
@Test
@@ -542,29 +599,32 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-outline-color");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- fillOutlineColor(
- property(
- "FeaturePropertyA",
- categorical(
- stop("valueA", fillOutlineColor(Color.RED))
- )
- ).withDefaultValue(fillOutlineColor(Color.GREEN))
- )
- );
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ fillOutlineColor(
+ property(
+ "FeaturePropertyA",
+ categorical(
+ stop("valueA", fillOutlineColor(Color.RED))
+ )
+ ).withDefaultValue(fillOutlineColor(Color.GREEN))
+ )
+ );
+
+ // Verify
+ assertNotNull(layer.getFillOutlineColor());
+ assertNotNull(layer.getFillOutlineColor().getFunction());
+ assertEquals(SourceFunction.class, layer.getFillOutlineColor().getFunction().getClass());
+ assertEquals("FeaturePropertyA", ((SourceFunction) layer.getFillOutlineColor().getFunction()).getProperty());
+ assertEquals(CategoricalStops.class, layer.getFillOutlineColor().getFunction().getStops().getClass());
+ assertNotNull(((SourceFunction) layer.getFillOutlineColor().getFunction()).getDefaultValue());
+ assertNotNull(((SourceFunction) layer.getFillOutlineColor().getFunction()).getDefaultValue().getValue());
+ assertEquals(Color.GREEN, (int) ((SourceFunction) layer.getFillOutlineColor().getFunction()).getDefaultValue().getColorInt());
+ });
- // Verify
- assertNotNull(layer.getFillOutlineColor());
- assertNotNull(layer.getFillOutlineColor().getFunction());
- assertEquals(SourceFunction.class, layer.getFillOutlineColor().getFunction().getClass());
- assertEquals("FeaturePropertyA", ((SourceFunction) layer.getFillOutlineColor().getFunction()).getProperty());
- assertEquals(CategoricalStops.class, layer.getFillOutlineColor().getFunction().getStops().getClass());
- assertNotNull(((SourceFunction) layer.getFillOutlineColor().getFunction()).getDefaultValue());
- assertNotNull(((SourceFunction) layer.getFillOutlineColor().getFunction()).getDefaultValue().getValue());
- assertEquals(Color.GREEN, (int) ((SourceFunction) layer.getFillOutlineColor().getFunction()).getDefaultValue().getColorInt());
}
@Test
@@ -572,11 +632,13 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-outline-color");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- layer.setProperties(fillOutlineColor(Color.RED));
- assertEquals(layer.getFillOutlineColorAsInt(), Color.RED);
+ // Set and Get
+ layer.setProperties(fillOutlineColor(Color.RED));
+ assertEquals(layer.getFillOutlineColorAsInt(), Color.RED);
+ });
}
@Test
@@ -584,12 +646,14 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-translateTransitionOptions");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- TransitionOptions options = new TransitionOptions(300, 100);
- layer.setFillTranslateTransition(options);
- assertEquals(layer.getFillTranslateTransition(), options);
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setFillTranslateTransition(options);
+ assertEquals(layer.getFillTranslateTransition(), options);
+ });
}
@Test
@@ -597,11 +661,13 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-translate");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- layer.setProperties(fillTranslate(new Float[]{0f,0f}));
- assertEquals((Float[]) layer.getFillTranslate().getValue(), (Float[]) new Float[]{0f,0f});
+ // Set and Get
+ layer.setProperties(fillTranslate(new Float[] {0f, 0f}));
+ assertEquals((Float[]) layer.getFillTranslate().getValue(), (Float[]) new Float[] {0f, 0f});
+ });
}
@Test
@@ -609,26 +675,28 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-translate");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- fillTranslate(
- zoom(
- exponential(
- stop(2, fillTranslate(new Float[]{0f,0f}))
- ).withBase(0.5f)
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ fillTranslate(
+ zoom(
+ exponential(
+ stop(2, fillTranslate(new Float[] {0f, 0f}))
+ ).withBase(0.5f)
+ )
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getFillTranslate());
- assertNotNull(layer.getFillTranslate().getFunction());
- assertEquals(CameraFunction.class, layer.getFillTranslate().getFunction().getClass());
- assertEquals(ExponentialStops.class, layer.getFillTranslate().getFunction().getStops().getClass());
- assertEquals(0.5f, ((ExponentialStops) layer.getFillTranslate().getFunction().getStops()).getBase(), 0.001);
- assertEquals(1, ((ExponentialStops) layer.getFillTranslate().getFunction().getStops()).size());
+ // Verify
+ assertNotNull(layer.getFillTranslate());
+ assertNotNull(layer.getFillTranslate().getFunction());
+ assertEquals(CameraFunction.class, layer.getFillTranslate().getFunction().getClass());
+ assertEquals(ExponentialStops.class, layer.getFillTranslate().getFunction().getStops().getClass());
+ assertEquals(0.5f, ((ExponentialStops) layer.getFillTranslate().getFunction().getStops()).getBase(), 0.001);
+ assertEquals(1, ((ExponentialStops) layer.getFillTranslate().getFunction().getStops()).size());
+ });
}
@Test
@@ -636,11 +704,13 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-translate-anchor");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- layer.setProperties(fillTranslateAnchor(FILL_TRANSLATE_ANCHOR_MAP));
- assertEquals((String) layer.getFillTranslateAnchor().getValue(), (String) FILL_TRANSLATE_ANCHOR_MAP);
+ // Set and Get
+ layer.setProperties(fillTranslateAnchor(FILL_TRANSLATE_ANCHOR_MAP));
+ assertEquals((String) layer.getFillTranslateAnchor().getValue(), (String) FILL_TRANSLATE_ANCHOR_MAP);
+ });
}
@Test
@@ -648,25 +718,27 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-translate-anchor");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- fillTranslateAnchor(
- zoom(
- interval(
- stop(2, fillTranslateAnchor(FILL_TRANSLATE_ANCHOR_MAP))
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ fillTranslateAnchor(
+ zoom(
+ interval(
+ stop(2, fillTranslateAnchor(FILL_TRANSLATE_ANCHOR_MAP))
+ )
)
)
- )
- );
+ );
- // Verify
- assertNotNull(layer.getFillTranslateAnchor());
- assertNotNull(layer.getFillTranslateAnchor().getFunction());
- assertEquals(CameraFunction.class, layer.getFillTranslateAnchor().getFunction().getClass());
- assertEquals(IntervalStops.class, layer.getFillTranslateAnchor().getFunction().getStops().getClass());
- assertEquals(1, ((IntervalStops) layer.getFillTranslateAnchor().getFunction().getStops()).size());
+ // Verify
+ assertNotNull(layer.getFillTranslateAnchor());
+ assertNotNull(layer.getFillTranslateAnchor().getFunction());
+ assertEquals(CameraFunction.class, layer.getFillTranslateAnchor().getFunction().getClass());
+ assertEquals(IntervalStops.class, layer.getFillTranslateAnchor().getFunction().getStops().getClass());
+ assertEquals(1, ((IntervalStops) layer.getFillTranslateAnchor().getFunction().getStops()).size());
+ });
}
@Test
@@ -674,12 +746,14 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-patternTransitionOptions");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- TransitionOptions options = new TransitionOptions(300, 100);
- layer.setFillPatternTransition(options);
- assertEquals(layer.getFillPatternTransition(), options);
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setFillPatternTransition(options);
+ assertEquals(layer.getFillPatternTransition(), options);
+ });
}
@Test
@@ -687,11 +761,13 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-pattern");
- assertNotNull(layer);
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
- // Set and Get
- layer.setProperties(fillPattern("pedestrian-polygon"));
- assertEquals((String) layer.getFillPattern().getValue(), (String) "pedestrian-polygon");
+ // Set and Get
+ layer.setProperties(fillPattern("pedestrian-polygon"));
+ assertEquals((String) layer.getFillPattern().getValue(), (String) "pedestrian-polygon");
+ });
}
@Test
@@ -699,25 +775,27 @@ public class FillLayerTest extends BaseActivityTest {
validateTestSetup();
setupLayer();
Timber.i("fill-pattern");
- assertNotNull(layer);
-
- // Set
- layer.setProperties(
- fillPattern(
- zoom(
- interval(
- stop(2, fillPattern("pedestrian-polygon"))
+ invoke(mapboxMap, (uiController, mapboxMap) -> {
+ assertNotNull(layer);
+
+ // Set
+ layer.setProperties(
+ fillPattern(
+ zoom(
+ interval(
+ stop(2, fillPattern("pedestrian-polygon"))
+ )
)
)
- )
- );
-
- // Verify
- assertNotNull(layer.getFillPattern());
- assertNotNull(layer.getFillPattern().getFunction());
- assertEquals(CameraFunction.class, layer.getFillPattern().getFunction().getClass());
- assertEquals(IntervalStops.class, layer.getFillPattern().getFunction().getStops().getClass());
- assertEquals(1, ((IntervalStops) layer.getFillPattern().getFunction().getStops()).size());
+ );
+
+ // Verify
+ assertNotNull(layer.getFillPattern());
+ assertNotNull(layer.getFillPattern().getFunction());
+ assertEquals(CameraFunction.class, layer.getFillPattern().getFunction().getClass());
+ assertEquals(IntervalStops.class, layer.getFillPattern().getFunction().getStops().getClass());
+ assertEquals(1, ((IntervalStops) layer.getFillPattern().getFunction().getStops()).size());
+ });
}
}