Fix database/impl androidTest. We need the 22.json schema file, since the test tests the migration. The junit-jupiter-api dependency causes errors during build (when the package is merged) and it's not needed for androidTest.
This commit is contained in:
parent
44b8b30637
commit
bb133cdbce
3 changed files with 3609 additions and 5 deletions
|
@ -13,7 +13,6 @@ dependencies {
|
|||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
||||
androidTestImplementation "androidx.test.ext:junit-ktx:$androidx_junit_version"
|
||||
androidTestImplementation "androidx.test:rules:$androidx_rules_version"
|
||||
androidTestImplementation "org.junit.jupiter:junit-jupiter-api:$junit_jupiter_version"
|
||||
|
||||
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
|
||||
}
|
||||
|
|
3605
database/impl/schemas/app.aaps.database.impl.AppDatabase/22.json
Normal file
3605
database/impl/schemas/app.aaps.database.impl.AppDatabase/22.json
Normal file
File diff suppressed because it is too large
Load diff
|
@ -16,7 +16,7 @@ import org.junit.Test
|
|||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
internal class HeartRateDaoTest {
|
||||
class HeartRateDaoTest {
|
||||
|
||||
private val context = ApplicationProvider.getApplicationContext<Context>()
|
||||
private fun createDatabase() =
|
||||
|
@ -86,9 +86,9 @@ internal class HeartRateDaoTest {
|
|||
dao.insertNewEntry(hr1)
|
||||
dao.insertNewEntry(hr2)
|
||||
|
||||
assertEquals(listOf(hr1, hr2), dao.getFromTime(timestamp))
|
||||
assertEquals(listOf(hr2), dao.getFromTime(timestamp + 1))
|
||||
assertTrue(dao.getFromTime(timestamp + 2).isEmpty())
|
||||
assertEquals(listOf(hr1, hr2), dao.getFromTime(timestamp).blockingGet())
|
||||
assertEquals(listOf(hr2), dao.getFromTime(timestamp + 1).blockingGet())
|
||||
assertTrue(dao.getFromTime(timestamp + 2).blockingGet().isEmpty())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue