Seems like the contents of that jar file only has dummy implementations of all methods. Found this thread explaining it a bit: http://groups.google.com/group/android-developers/browse_thread/thread/a680b65f287e1b8c
Solution is to run all tests on the simulator (or the real device). Visually it still looks the same in Eclipse, thank you Eclipse ADT plugin developers :-). //Johan On 21 Sep, 08:27, Walles <[email protected]> wrote: > Hi! > > I'm writing unit tests for a class containing Locations. To create a > (mock) Location, I do this: > > Location from = new Location("Johan"); > > However, the Location(String) constructor throws a RuntimeException > saying "Stub!". > > How can I create a mock location? > > Note that I'm running this on the plain JDK with android.jar in the > path, after JUnit but before my own stuff. No device or emulator is > involved. The android.jar file is from the platforms/android-1.5 > directory of android-sdk-linux_x86-1.6_r1. > > Regards //Johan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

