[android] #5610 - Runtime style api - part 2

This commit is contained in:
Ivo van Dongen
2016-07-26 17:02:52 -04:00
parent ed821c06d9
commit 10b2cc60a7
73 changed files with 6974 additions and 297 deletions

View File

@@ -0,0 +1,29 @@
package com.mapbox.mapboxsdk.style.layers;
import org.junit.Test;
import static com.mapbox.mapboxsdk.style.layers.Function.*;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.*;
import static org.junit.Assert.*;
/**
* Tests Function
*/
public class FunctionTest {
@Test
public void testZoomFunction() {
Function zoomF = zoom(
stop(1f, lineBlur(1f)),
stop(10f, lineBlur(20f))
);
assertNotNull(zoomF.toValueObject());
assertArrayEquals(
new Object[]{new Object[]{1f, 1f}, new Object[]{10f, 20f}},
(Object[]) zoomF.toValueObject().get("stops")
);
}
}