I've written several unit tests for an already existing
DatabaseOpenHelper class. I covered the creation scenario and migration from old schema to new one. Unfortunately, I don't feel that my tests are good. For example, for DB creation I check that
SQLiteDatabase. execSQL() was called three times (we have three tables so far) and check that query string is in set of specified SQL strings.
The issue so far - if someone changes order of columns the test will fail. Probably this is OK.
But what are other ways of SQL schema unit testing? Or don't you have unit tests for that, and rely only on the integration one?