Mark Murphy (a Commons Guy) wrote:
>
> Stuart Turner 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.
>
You might find Android Mock
http://code.google.com/p/android-mock/
<http://code.google.com/p/android-mock/>helpful.

-- 
Lew
 

-- 
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