I'm trying to set-up unit test cases for my application.
A critical part of the app parses XML files with org.xmlpull.v1.XmlPullParser
. As this part is low-level, isolated and independant from activities, context, views, etc., I really wanted to make it run locally on the JVM, to avoid having to plug or emulate a device all the time.
However when running something like this on the JVM:
XmlPullParser parser = Xml.newPullParser();
parser.setInput(in, null);
...
I get the famous:
Exception in thread "main" java.lang.RuntimeException: Stub!
at android.util.Xml.newPullParser(Xml.java:15)
...
Is there a way around this?