My current test class extends `ActivityInstrumentationTestCase2`. If I change it to extend `ApplicationTestCase`, how do I start an activity?
On Sun, Feb 23, 2014 at 12:16 AM, Code Guru <[email protected]> wrote: > The `ContentProvider` is created indirectly by calling > `getContentResolver()` from inside a method of the `Activity` under test. I > will have to look into using `ApplicationTestCase` as you suggest. > > > On Sat, Feb 22, 2014 at 11:44 PM, Danny D <[email protected]>wrote: > >> Is the object instance for the content provider different between test >> runs? How are you destroying and recreating the ContentProvider? >> >> I suspect that if the Application instance is the same between test runs >> the ContentProvider might be too. It's created at the Application level >> through the manifest, so you may need to use an ApplicationTestCase or >> something similar to be sure that the App instance is killed and restarted >> between tests. >> >> -- >> 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 >> --- >> You received this message because you are subscribed to a topic in the >> Google Groups "Android Developers" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/android-developers/oOCF2V8tf90/unsubscribe >> . >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- 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 --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

