diff options
Diffstat (limited to 'platform/android')
2 files changed, 11 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/SymbolLayerTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/SymbolLayerTest.java index fe38fef253..1a5d4ebc2b 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/SymbolLayerTest.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/SymbolLayerTest.java @@ -272,6 +272,9 @@ public class SymbolLayerTest extends BaseActivityTest { // Set and Get layer.setProperties(iconImage("undefined")); assertEquals((String) layer.getIconImage().getValue(), (String) "undefined"); + + layer.setProperties(iconImage("{token}")); + assertEquals(layer.getIconImage().getExpression(), Expression.toString(Expression.get("token"))); }); } @@ -446,6 +449,9 @@ public class SymbolLayerTest extends BaseActivityTest { // Set and Get layer.setProperties(textField("")); assertEquals((String) layer.getTextField().getValue(), (String) ""); + + layer.setProperties(textField("{token}")); + assertEquals(layer.getTextField().getExpression(), Expression.toString(Expression.get("token"))); }); } diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/layer.junit.ejs b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/layer.junit.ejs index 575f64e809..8acfc88dfa 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/layer.junit.ejs +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/layer.junit.ejs @@ -148,6 +148,11 @@ public class <%- camelize(type) %>LayerTest extends BaseActivityTest { // Set and Get layer.setProperties(<%- camelizeWithLeadingLowercase(property.name) %>(<%- defaultValueJava(property) %>)); assertEquals((<%- propertyType(property) %>) layer.get<%- camelize(property.name) %>().getValue(), (<%- propertyType(property) %>) <%- defaultValueJava(property) %>); +<% if (property.tokens) { -%> + + layer.setProperties(<%- camelizeWithLeadingLowercase(property.name) %>("{token}")); + assertEquals(layer.get<%- camelize(property.name) %>().getExpression(), Expression.toString(Expression.get("token"))); +<% } -%> }); } <% if (property['property-type'] === 'data-driven' || property['property-type'] === 'cross-faded-data-driven') { -%> |