diff options
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/maps/MapboxMapOptionsTest.java')
-rw-r--r-- | platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/maps/MapboxMapOptionsTest.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/maps/MapboxMapOptionsTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/maps/MapboxMapOptionsTest.java index 1f69f7bcd7..05d1f2beb1 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/maps/MapboxMapOptionsTest.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/test/java/com/mapbox/mapboxsdk/maps/MapboxMapOptionsTest.java @@ -7,7 +7,6 @@ import com.mapbox.mapboxsdk.camera.CameraPosition; import com.mapbox.mapboxsdk.constants.MapboxConstants; import com.mapbox.mapboxsdk.constants.Style; import com.mapbox.mapboxsdk.geometry.LatLng; -import com.mapbox.mapboxsdk.utils.MockParcel; import org.junit.Test; @@ -22,6 +21,8 @@ import static org.junit.Assert.assertTrue; public class MapboxMapOptionsTest { + private static final double DELTA = 1e-15; + @Test public void testSanity() { assertNotNull("should not be null", new MapboxMapOptions()); @@ -99,16 +100,16 @@ public class MapboxMapOptionsTest { @Test public void testMinZoom() { - assertEquals(MapboxConstants.MINIMUM_ZOOM, new MapboxMapOptions().getMinZoom()); - assertEquals(5.0f, new MapboxMapOptions().minZoom(5.0f).getMinZoom()); - assertNotEquals(2.0f, new MapboxMapOptions().minZoom(5.0f).getMinZoom()); + assertEquals(MapboxConstants.MINIMUM_ZOOM, new MapboxMapOptions().getMinZoomPreference(), DELTA); + assertEquals(5.0f, new MapboxMapOptions().minZoomPreference(5.0f).getMinZoomPreference(), DELTA); + assertNotEquals(2.0f, new MapboxMapOptions().minZoomPreference(5.0f).getMinZoomPreference(), DELTA); } @Test public void testMaxZoom() { - assertEquals(MapboxConstants.MAXIMUM_ZOOM, new MapboxMapOptions().getMaxZoom()); - assertEquals(5.0f, new MapboxMapOptions().maxZoom(5.0f).getMaxZoom()); - assertNotEquals(2.0f, new MapboxMapOptions().maxZoom(5.0f).getMaxZoom()); + assertEquals(MapboxConstants.MAXIMUM_ZOOM, new MapboxMapOptions().getMaxZoomPreference(), DELTA); + assertEquals(5.0f, new MapboxMapOptions().maxZoomPreference(5.0f).getMaxZoomPreference(), DELTA); + assertNotEquals(2.0f, new MapboxMapOptions().maxZoomPreference(5.0f).getMaxZoomPreference(), DELTA); } @Test |