Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
pengdev committed May 27, 2021
1 parent 6ce51a6 commit 3bc2fe2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sdk/src/test/java/com/mapbox/maps/MapInitOptionsTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class MapInitOptionsTest {
fun defaultResourceOptions() {
val mapboxMapOptions = MapInitOptions(context)
assertEquals("token", mapboxMapOptions.resourceOptions.accessToken)
assertTrue(mapboxMapOptions.resourceOptions.cachePath!!.endsWith("foobar/mapbox/maps/ambient_cache.db"))
assertTrue(mapboxMapOptions.resourceOptions.cachePath!!.endsWith("foobar/.mapbox/maps/ambient_cache.db"))
assertEquals(DEFAULT_CACHE_SIZE, mapboxMapOptions.resourceOptions.cacheSize)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ResourceAttributeParserTest {
ResourcesAttributeParser.parseResourcesOptions(context, typedArray, CredentialsManager.default)
assertEquals("pk.foobar", resourceOptions.accessToken)
assertEquals(null, resourceOptions.baseURL)
assertEquals("/foobar/mapbox/maps/ambient_cache.db", resourceOptions.cachePath)
assertEquals("/foobar/.mapbox/maps/ambient_cache.db", resourceOptions.cachePath)
assertEquals(99L, resourceOptions.cacheSize)
}

Expand All @@ -51,7 +51,7 @@ class ResourceAttributeParserTest {
fun cachePath() {
val resourceOptions =
ResourcesAttributeParser.parseResourcesOptions(context, typedArray, CredentialsManager.default)
assertEquals("/foobar/mapbox/maps/ambient_cache.db", resourceOptions.cachePath)
assertEquals("/foobar/.mapbox/maps/ambient_cache.db", resourceOptions.cachePath)
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ResourceOptionsManagerTest {
fun getDefaultResourceOptionsManagerTest() {
val defaultResourceOptionsManager = ResourceOptionsManager.getDefault(context)
assertEquals("token", defaultResourceOptionsManager.resourceOptions.accessToken)
Assert.assertTrue(defaultResourceOptionsManager.resourceOptions.cachePath!!.endsWith("/mapbox/maps/ambient_cache.db"))
Assert.assertTrue(defaultResourceOptionsManager.resourceOptions.cachePath!!.endsWith("/.mapbox/maps/ambient_cache.db"))
assertEquals(DEFAULT_CACHE_SIZE, defaultResourceOptionsManager.resourceOptions.cacheSize)
}

Expand Down

0 comments on commit 3bc2fe2

Please sign in to comment.