Add tests for migrations in the Room database

Doing this increase the level of reliability of migrations, as we can be
pretty much more confident of avoiding problems with them.
This commit is contained in:
Mauricio Colli 2020-03-07 14:46:32 -03:00
parent 229ad77800
commit 21d6a9e673
2 changed files with 85 additions and 0 deletions

View file

@ -84,6 +84,10 @@ android {
androidExtensions {
experimental = true
}
sourceSets {
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
}
}
ext {
@ -100,6 +104,8 @@ ext {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation "android.arch.persistence.room:testing:1.1.1"
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
exclude module: 'support-annotations'
})