summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/location/MapboxAnimatorTest.kt
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/location/MapboxAnimatorTest.kt')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/location/MapboxAnimatorTest.kt43
1 files changed, 0 insertions, 43 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/location/MapboxAnimatorTest.kt b/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/location/MapboxAnimatorTest.kt
deleted file mode 100644
index 7c126c7832..0000000000
--- a/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/location/MapboxAnimatorTest.kt
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.mapbox.mapboxsdk.location
-
-import android.animation.ValueAnimator
-import io.mockk.every
-import io.mockk.mockk
-import io.mockk.verify
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.robolectric.RobolectricTestRunner
-
-@RunWith(RobolectricTestRunner::class)
-class MapboxAnimatorTest {
-
- @Test
- fun fps_unlimited() {
- val valueAnimator = mockk<ValueAnimator>()
- every { valueAnimator.animatedValue } answers { 5f }
- val listener = mockk<MapboxAnimator.AnimationsValueChangeListener<Float>>()
- every { listener.onNewAnimationValue(any()) } answers {}
- val mapboxAnimator = MapboxFloatAnimator(0f, 10f, listener, Int.MAX_VALUE)
-
- for (i in 0 until 5)
- mapboxAnimator.onAnimationUpdate(valueAnimator)
-
- verify(exactly = 5) { listener.onNewAnimationValue(5f) }
- }
-
- @Test
- fun fps_limited() {
- val valueAnimator = mockk<ValueAnimator>()
- every { valueAnimator.animatedValue } answers { 5f }
- val listener = mockk<MapboxAnimator.AnimationsValueChangeListener<Float>>()
- every { listener.onNewAnimationValue(any()) } answers {}
- val mapboxAnimator = MapboxFloatAnimator(0f, 10f, listener, 5)
-
- for (i in 0 until 5) {
- mapboxAnimator.onAnimationUpdate(valueAnimator)
- Thread.sleep(150)
- }
-
- verify(exactly = 3) { listener.onNewAnimationValue(5f) }
- }
-} \ No newline at end of file