On Tue, Nov 22, 2011 at 5:22 AM, Stuart Turner <[email protected]> wrote: > I'd like to unit test a fragment but cannot find any documentation or > examples of how this can be achieved. > > Can anyone assist me with this please?
Use the same approaches as you would for a View. Use AndroidTestCase to confirm your inflation worked (if you are inflating a layout). Use ActivityInstrumentationTestCase2, etc. to test it as used by an activity. There may be other options here as well. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- 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

