summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/style/expressions/ExpressionTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/style/expressions/ExpressionTest.java')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/style/expressions/ExpressionTest.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/style/expressions/ExpressionTest.java b/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/style/expressions/ExpressionTest.java
index 79bcdd7b5e..5ab1542b8b 100644
--- a/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/style/expressions/ExpressionTest.java
+++ b/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/style/expressions/ExpressionTest.java
@@ -4,6 +4,7 @@ import android.graphics.Color;
import com.mapbox.mapboxsdk.style.layers.PropertyFactory;
+import com.mapbox.mapboxsdk.style.layers.PropertyValue;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
@@ -87,6 +88,7 @@ import static com.mapbox.mapboxsdk.style.expressions.Expression.upcase;
import static com.mapbox.mapboxsdk.style.expressions.Expression.var;
import static com.mapbox.mapboxsdk.style.expressions.Expression.zoom;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.lineOpacity;
+import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.lineWidth;
import static junit.framework.Assert.assertTrue;
import static org.junit.Assert.assertEquals;
@@ -97,6 +99,18 @@ import static org.junit.Assert.assertEquals;
public class ExpressionTest {
@Test
+ public void testPropertyValueIsExpression() {
+ PropertyValue<?> property = lineWidth(Expression.get("width"));
+ assertTrue(property.isExpression());
+ }
+
+ @Test
+ public void testPropertyValueEqualsExpression() {
+ PropertyValue<?> property = lineWidth(Expression.get("width"));
+ assertEquals(Expression.get("width"), property.getExpression());
+ }
+
+ @Test
public void testRgb() throws Exception {
Object[] expected = new Object[] {"rgb", 0f, 0f, 0f};
Object[] actual = rgb(literal(0), literal(0), literal(0)).toArray();