@@ -4,6 +4,9 @@ import android.app.Application
4
4
import android.content.Context
5
5
import androidx.test.ext.junit.runners.AndroidJUnit4
6
6
import androidx.test.platform.app.InstrumentationRegistry
7
+ import com.mapbox.bindgen.ExpectedFactory
8
+ import com.mapbox.common.LogConfiguration
9
+ import com.mapbox.common.LoggingLevel
7
10
import com.mapbox.common.MapboxOptions
8
11
import com.mapbox.common.location.LocationProvider
9
12
import com.mapbox.geojson.BoundingBox
@@ -26,6 +29,7 @@ import com.mapbox.search.common.metadata.OpenHours
26
29
import com.mapbox.search.common.metadata.OpenPeriod
27
30
import com.mapbox.search.common.metadata.WeekDay
28
31
import com.mapbox.search.common.metadata.WeekTimestamp
32
+ import com.mapbox.search.common.tests.assertEqualsExpected
29
33
import com.mapbox.search.internal.bindgen.ApiType
30
34
import kotlinx.coroutines.runBlocking
31
35
import okhttp3.mockwebserver.Dispatcher
@@ -38,6 +42,7 @@ import org.junit.Assert.assertEquals
38
42
import org.junit.Assert.assertNotNull
39
43
import org.junit.Assert.assertTrue
40
44
import org.junit.Before
45
+ import org.junit.BeforeClass
41
46
import org.junit.Test
42
47
import org.junit.runner.RunWith
43
48
import java.io.IOException
@@ -137,8 +142,10 @@ internal class PlaceAutocompleteIntegrationTest {
137
142
placeAutocomplete.suggestions(TEST_QUERY )
138
143
}
139
144
140
- assertTrue(response.isValue)
141
- assertTrue(requireNotNull(response.value).isEmpty())
145
+ assertEqualsExpected(
146
+ ExpectedFactory .createValue(emptyList()),
147
+ response,
148
+ )
142
149
}
143
150
144
151
@Test
@@ -559,5 +566,11 @@ internal class PlaceAutocompleteIntegrationTest {
559
566
.setResponseCode(200 )
560
567
.setBody(readFileFromAssets(bodyContentPath))
561
568
}
569
+
570
+ @BeforeClass
571
+ @JvmStatic
572
+ fun enableDebugLogs () {
573
+ LogConfiguration .setLoggingLevel(LoggingLevel .DEBUG )
574
+ }
562
575
}
563
576
}
0 commit comments