File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
app/src/test/kotlin/fr/free/nrw/commons/utils Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ package fr.free.nrw.commons.utils
2
+
3
+ import fr.free.nrw.commons.location.LatLng
4
+ import org.junit.Test
5
+ import org.junit.jupiter.api.Assertions.assertEquals
6
+
7
+ /* *
8
+ * Test class for location utils
9
+ */
10
+ class LocationUtilsTest {
11
+
12
+ /* *
13
+ * MapBox LatLng to commons LatLng test.
14
+ */
15
+ @Test
16
+ fun testMapBoxLatLngToCommonsLatLng () {
17
+ val commonsLatLngTest = LocationUtils .mapBoxLatLngToCommonsLatLng(com.mapbox.mapboxsdk.geometry.LatLng (0.0 , 0.0 ))
18
+ assertEquals(0.0 , commonsLatLngTest.latitude)
19
+ assertEquals(0.0 , commonsLatLngTest.longitude)
20
+ assertEquals(0f , commonsLatLngTest.accuracy)
21
+ }
22
+
23
+ /* *
24
+ * Commons LatLng to MapBox LatLng test.
25
+ */
26
+ @Test
27
+ fun testCommonsLatLngToMapBoxLatLng () {
28
+ val geoLatLngTest = LocationUtils .commonsLatLngToMapBoxLatLng(LatLng (0.0 , 0.0 , 0f ))
29
+ assertEquals(0.0 , geoLatLngTest.latitude)
30
+ assertEquals(0.0 , geoLatLngTest.longitude)
31
+ assertEquals(0.0 , geoLatLngTest.altitude)
32
+ }
33
+
34
+ }
You can’t perform that action at this time.
0 commit comments