diff options
author | Fabian Guerra <fabian.guerra@mapbox.com> | 2018-04-23 10:44:02 -0400 |
---|---|---|
committer | Fabian Guerra <fabian.guerra@mapbox.com> | 2018-04-23 10:44:02 -0400 |
commit | e08b6fe87f5824ab05a4cc67d9a76af5bb5ddd3b (patch) | |
tree | 886e10260bfa044f62943186ec837b9ccd02934c /platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/maps/UiSettingsTest.java | |
parent | 2bb785dad2489d04db179fa9cf65514640db0a96 (diff) | |
parent | a45670cfb5752866b9c8130024a313944684c2db (diff) | |
download | qtlocation-mapboxgl-upstream/fabian-merge-v4.0.0.tar.gz |
Merge branch 'release-boba' into masterupstream/fabian-merge-v4.0.0
# Conflicts:
# circle.yml
# include/mbgl/style/expression/let.hpp
# platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/geometry/LatLngBounds.java
# platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapGestureDetector.java
# platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapKeyListener.java
# platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
# platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
# platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Projection.java
# platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Transform.java
# platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/geometry/LatLngBoundsTest.java
# platform/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml
# platform/android/gradle/dependencies.gradle
# platform/android/src/example_custom_layer.cpp
# platform/android/src/geojson/point.cpp
# platform/darwin/src/NSPredicate+MGLAdditions.mm
# platform/darwin/test/MGLExpressionTests.mm
# platform/ios/Mapbox-iOS-SDK-nightly-dynamic.podspec
# platform/ios/Mapbox-iOS-SDK-symbols.podspec
# platform/ios/Mapbox-iOS-SDK.podspec
# platform/ios/app/MBXViewController.m
# src/mbgl/renderer/layers/render_custom_layer.cpp
# src/mbgl/style/conversion/filter.cpp
# src/mbgl/style/expression/interpolate.cpp
# src/mbgl/style/expression/value.cpp
# test/style/filter.test.cpp
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/maps/UiSettingsTest.java')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/maps/UiSettingsTest.java | 148 |
1 files changed, 76 insertions, 72 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/maps/UiSettingsTest.java b/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/maps/UiSettingsTest.java index fbe00b4dce..cfce56e6e9 100644 --- a/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/maps/UiSettingsTest.java +++ b/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/maps/UiSettingsTest.java @@ -181,13 +181,6 @@ public class UiSettingsTest { } @Test - public void testRotateGestureChange() { - assertEquals("Default state should be true", true, uiSettings.isRotateGestureChangeAllowed()); - uiSettings.setRotateGestureChangeAllowed(false); - assertEquals("State should have been changed", false, uiSettings.isRotateGestureChangeAllowed()); - } - - @Test public void testRotateGestureChangeAllowed() { uiSettings.setRotateGesturesEnabled(false); assertEquals("Rotate gesture should be false", false, uiSettings.isRotateGesturesEnabled()); @@ -196,14 +189,6 @@ public class UiSettingsTest { } @Test - public void testRotateGestureChangeDisallowed() { - assertEquals("Rotate gesture should be true", true, uiSettings.isRotateGesturesEnabled()); - uiSettings.setRotateGestureChangeAllowed(false); - uiSettings.setRotateGesturesEnabled(false); - assertEquals("Rotate gesture change should be ignored", true, uiSettings.isRotateGesturesEnabled()); - } - - @Test public void testTiltGesturesEnabled() { uiSettings.setTiltGesturesEnabled(true); assertEquals("Tilt gesture should be enabled", true, uiSettings.isTiltGesturesEnabled()); @@ -216,13 +201,6 @@ public class UiSettingsTest { } @Test - public void testTiltGestureChange() { - assertEquals("Default state should be true", true, uiSettings.isTiltGestureChangeAllowed()); - uiSettings.setTiltGestureChangeAllowed(false); - assertEquals("State should have been changed", false, uiSettings.isTiltGestureChangeAllowed()); - } - - @Test public void testTiltGestureChangeAllowed() { uiSettings.setTiltGesturesEnabled(false); assertEquals("Tilt gesture should be false", false, uiSettings.isTiltGesturesEnabled()); @@ -231,14 +209,6 @@ public class UiSettingsTest { } @Test - public void testTiltGestureChangeDisallowed() { - assertEquals("Tilt gesture should be true", true, uiSettings.isTiltGesturesEnabled()); - uiSettings.setTiltGestureChangeAllowed(false); - uiSettings.setTiltGesturesEnabled(false); - assertEquals("Tilt gesture change should be ignored", true, uiSettings.isTiltGesturesEnabled()); - } - - @Test public void testZoomGesturesEnabled() { uiSettings.setZoomGesturesEnabled(true); assertEquals("Zoom gesture should be enabled", true, uiSettings.isZoomGesturesEnabled()); @@ -251,13 +221,6 @@ public class UiSettingsTest { } @Test - public void testZoomGestureChange() { - assertEquals("Default state should be true", true, uiSettings.isZoomGestureChangeAllowed()); - uiSettings.setZoomGestureChangeAllowed(false); - assertEquals("State should have been changed", false, uiSettings.isZoomGestureChangeAllowed()); - } - - @Test public void testZoomGestureChangeAllowed() { uiSettings.setZoomGesturesEnabled(false); assertEquals("Zoom gesture should be false", false, uiSettings.isZoomGesturesEnabled()); @@ -266,14 +229,6 @@ public class UiSettingsTest { } @Test - public void testZoomGestureChangeDisallowed() { - assertEquals("Zoom gesture should be true", true, uiSettings.isZoomGesturesEnabled()); - uiSettings.setZoomGestureChangeAllowed(false); - uiSettings.setZoomGesturesEnabled(false); - assertEquals("Zooom gesture change should be ignored", true, uiSettings.isZoomGesturesEnabled()); - } - - @Test public void testZoomControlsEnabled() { uiSettings.setZoomControlsEnabled(true); assertEquals("Zoom controls should be enabled", true, uiSettings.isZoomControlsEnabled()); @@ -298,13 +253,6 @@ public class UiSettingsTest { } @Test - public void testDoubleTapGestureChange() { - assertEquals("Default state should be true", true, uiSettings.isDoubleTapGestureChangeAllowed()); - uiSettings.setDoubleTapGestureChangeAllowed(false); - assertEquals("State should have been changed", false, uiSettings.isDoubleTapGestureChangeAllowed()); - } - - @Test public void testDoubleTapGestureChangeAllowed() { uiSettings.setDoubleTapGesturesEnabled(false); assertEquals("DoubleTap gesture should be false", false, uiSettings.isDoubleTapGesturesEnabled()); @@ -313,14 +261,6 @@ public class UiSettingsTest { } @Test - public void testDoubleTapGestureChangeDisallowed() { - assertEquals("DoubleTap gesture should be true", true, uiSettings.isDoubleTapGesturesEnabled()); - uiSettings.setDoubleTapGestureChangeAllowed(false); - uiSettings.setDoubleTapGesturesEnabled(false); - assertEquals("DoubleTap gesture change should be ignored", true, uiSettings.isDoubleTapGesturesEnabled()); - } - - @Test public void testScrollGesturesEnabled() { uiSettings.setScrollGesturesEnabled(true); assertEquals("Scroll gesture should be enabled", true, uiSettings.isScrollGesturesEnabled()); @@ -333,13 +273,6 @@ public class UiSettingsTest { } @Test - public void testScrollGestureChange() { - assertEquals("Default state should be true", true, uiSettings.isScrollGestureChangeAllowed()); - uiSettings.setScrollGestureChangeAllowed(false); - assertEquals("State should have been changed", false, uiSettings.isScrollGestureChangeAllowed()); - } - - @Test public void testScrollGestureChangeAllowed() { uiSettings.setScrollGesturesEnabled(false); assertEquals("Scroll gesture should be false", false, uiSettings.isScrollGesturesEnabled()); @@ -348,11 +281,82 @@ public class UiSettingsTest { } @Test - public void testScrollGestureChangeDisallowed() { - assertEquals("Scroll gesture should be true", true, uiSettings.isScrollGesturesEnabled()); - uiSettings.setScrollGestureChangeAllowed(false); - uiSettings.setScrollGesturesEnabled(false); - assertEquals("Scroll gesture change should be ignored", true, uiSettings.isScrollGesturesEnabled()); + public void testScaleVelocityAnimationEnabled() { + uiSettings.setScaleVelocityAnimationEnabled(true); + assertEquals("Scale velocity animation should be enabled", true, uiSettings.isScaleVelocityAnimationEnabled()); + } + + @Test + public void testScaleVelocityAnimationDisabled() { + uiSettings.setScaleVelocityAnimationEnabled(false); + assertEquals("Scale velocity animation should be disabled", false, uiSettings.isScaleVelocityAnimationEnabled()); + } + + @Test + public void testRotateVelocityAnimationEnabled() { + uiSettings.setRotateVelocityAnimationEnabled(true); + assertEquals("Rotate velocity animation should be enabled", true, uiSettings.isRotateVelocityAnimationEnabled()); + } + + @Test + public void testRotateVelocityAnimationDisabled() { + uiSettings.setRotateVelocityAnimationEnabled(false); + assertEquals("Rotate velocity animation should be disabled", false, uiSettings.isRotateVelocityAnimationEnabled()); + } + + @Test + public void testFlingVelocityAnimationEnabled() { + uiSettings.setFlingVelocityAnimationEnabled(true); + assertEquals("Fling velocity animation should be enabled", true, uiSettings.isFlingVelocityAnimationEnabled()); + } + + @Test + public void testFlingVelocityAnimationDisabled() { + uiSettings.setFlingVelocityAnimationEnabled(false); + assertEquals("Fling velocity animation should be disabled", false, uiSettings.isFlingVelocityAnimationEnabled()); + } + + @Test + public void testAllVelocityAnimationsEnabled() { + uiSettings.setAllVelocityAnimationsEnabled(true); + assertEquals("Scale velocity animation should be enabled", true, uiSettings.isScaleVelocityAnimationEnabled()); + assertEquals("Rotate velocity animation should be enabled", true, uiSettings.isRotateVelocityAnimationEnabled()); + assertEquals("Fling velocity animation should be enabled", true, uiSettings.isFlingVelocityAnimationEnabled()); + } + + @Test + public void testAllVelocityAnimationsDisabled() { + uiSettings.setAllVelocityAnimationsEnabled(false); + assertEquals("Scale velocity animation should be disabled", false, uiSettings.isScaleVelocityAnimationEnabled()); + assertEquals("Rotate velocity animation should be disabled", false, uiSettings.isRotateVelocityAnimationEnabled()); + assertEquals("Fling velocity animation should be disabled", false, uiSettings.isFlingVelocityAnimationEnabled()); + } + + @Test + public void testIncreaseRotateThresholdWhenScalingEnabled() { + uiSettings.setIncreaseRotateThresholdWhenScaling(true); + assertEquals("Rotate threshold increase should be enabled", true, + uiSettings.isIncreaseRotateThresholdWhenScaling()); + } + + @Test + public void testIncreaseRotateThresholdWhenScalingDisabled() { + uiSettings.setIncreaseRotateThresholdWhenScaling(false); + assertEquals("Rotate threshold increase should be disabled", false, + uiSettings.isIncreaseRotateThresholdWhenScaling()); + } + + @Test + public void testIncreaseScaleThresholdWhenRotatingEnabled() { + uiSettings.setIncreaseScaleThresholdWhenRotating(true); + assertEquals("Scale threshold increase should be enabled", true, uiSettings.isIncreaseScaleThresholdWhenRotating()); + } + + @Test + public void testIncreaseScaleThresholdWhenRotatingDisabled() { + uiSettings.setIncreaseScaleThresholdWhenRotating(false); + assertEquals("Scale threshold increase should be disabled", false, + uiSettings.isIncreaseScaleThresholdWhenRotating()); } @Test |