[android] Add OfflineManager.packDatabase() API

This commit is contained in:
Mikhail Pozdnyakov
2019-11-08 17:18:37 +02:00
parent f567a79dd8
commit 2edbe916ab
4 changed files with 87 additions and 2 deletions

View File

@@ -85,4 +85,20 @@ class CacheTest {
}
countDownLatch.await()
}
@Test
fun testSetPackDatabase() {
rule.activity.runOnUiThread {
OfflineManager.getInstance(context).packDatabase(object : OfflineManager.FileSourceCallback {
override fun onSuccess() {
countDownLatch.countDown()
}
override fun onError(message: String) {
Assert.assertNull("onError should not be called", message)
}
})
}
countDownLatch.await()
}
}