I\'m dipping my toes into Android development. I have a project that will interface with a RESTful resource and I\'m trying to figure out how to do a basic GET with params o
For anyone who may be interested, I bumped into a similar problem - though instead of HttpClient
I was getting stub errors for DateUtils
.
Stephen appears to be absolutely correct - classes that are part of the Android platform need the emulator up and running: http://simpleprogrammer.com/2010/07/27/the-best-way-to-unit-test-in-android/
Really quick summary of the above link:
As a matter of fact, all the methods are stubbed out to throw an exception with the message “Stub!” when you call them. How cute.
The real android.jar implementations live on the emulator, or your real Android device.
Therefore, you can unit test...
OR