views:

31

answers:

0

Hi there!! I've implemented access to a database using SQLiteOpenHelper of android.database within some classes (with pattern DAO). I wrote some junit tests for these classes using a AndroidTestCase but this cause the tests to use the same database of the application. I red ProviderTestCase2 or RenamingDelegatingContext can be used to test the database separately. Unluckily I couldn't find any nice tutorial/example that shows how to test a database with ProviderTestCase2/RenamingDelegatingContext.

Anyone can point me somewhere OR give me some tip OR share some code of tests of database?!

Cheeerrrrsss!! Giorgio