Hello,
I want to test ContentProvider that serves data from sqlite database.
How can I initialize ContentProvider using ProviderTestCase2 that it
would read data from certain database file?
My first idea was to add test.db to project assets and in ProviderTestCase2.setUp()
copy it to location where ContentProvider expectes to find db file.
Unfortunately creating ContentProvider with IsolatedContext or MockContext modifies database location so it changes to test.oldname.db and I observed that it recreates it
before each test (clears all data).

Best regards,
   Witek

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to