Open
Description
This should be more a question than an issue, don't know if theres a StackOverflow tag to ask them there, feel free to close if so.
At the moment I'm testing the migrations that I use like this:
@SmallTest
class MigrationTest {
private val TEST_DB = "migration-test"
@get:Rule
var helper: MigrationTestHelper? = null
init {
helper = MigrationTestHelper(InstrumentationRegistry.getInstrumentation(),
AnomalyDatabase::class.java.canonicalName, FrameworkSQLiteOpenHelperFactory())
}
@Test
fun migrate57To58() {
val db = helper?.createDatabase(TEST_DB, 57)
db?.close()
helper?.runMigrationsAndValidate(TEST_DB, 58, true, DBMigrations.MIGRATION_57_58)
}
}
Is there a way to test the migrations created by the library? Maybe being created at compile time makes this task difficult.
Thanks in advance. I really think this could be a powerful tool.
Metadata
Metadata
Assignees
Labels
No labels