You cannot use the JUnit framework to test things on the emulator. While you
can compile and even link, it will not run on it since all the
implementation is gone (the entry points are just stubs).
You must use the Android test cases for anything that tests Android specific
stuff. The best way to start this is to look into the ApiDemos/tests
directory, which has runnable test cases which come with documentation on
how to run them. (It takes a bit of figuring out though).

HTH
Ludwig

2008/10/30 Iroid <[EMAIL PROTECTED]>

>
> Hello Everyone,
> I have to test a class which is heavily accessing database.
> Now to access database I needed "context" this was done by passing
> current "activity" reference.
>
> In JUnit I couldn't find any way to create activity and pass in to
> those methods.
>
> I found ActivityUnitTestCase< T > in android sdk  but dont know how to
> use it :(
>
> Any help will be appreciated.....
>
> Thanks
>
> >
>

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