I have an application which uses its own content provider in several activities. I've written a ProviderTestCase2 for my content provider without much problem. For this I extended RenamingDelegatingContext to use a test database instance.
Now I want to write integration tests against my activities, but I again want to use a test database instance for the provider - like I did in my provider test. I'm having problems here. I don't see a way to inject a mock context or MockContentResolver into activities launched in ActivityInstrumentationTestCase2. So, I've tried using ActivityUnitTestCase, but this seems wrong since my test isn't a unit test, and I want to be able to write tests that simulate user interaction and make assertions about data in the test instance of my database. So... 1) Should I be using ActivityInstrumentationTestCase2 as the base test class? 2) If not, what base test class would you recommend? 3) How have you gotten this to work for you? Any examples? Thanks, Free -- 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

