[android-developers] Unable to mock Android classes
Hi folks,
I'm trying to create a development environment where ALL my Android
code is the subject of unit tests, but I've run into a bit of a hurdle
trying to mock out some Android classes.
Specifically I'm currently stuck on the TelephonyManager (although
there are others).
It has a constructor with the "default" access modifier so trying to
extend or mock it leads to:
java.lang.IllegalAccessError: tried to access method
android.telephony.TelephonyManager.<init>:()V
so, how can we create unit tests around code that use these services
without mocking them out to return specific values? (or just to
eliminate dependencies)
Thanks,
Jason.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home