I need to run unit tests for code that references SQLiteDatabase for my Android code; however all my attempts to instantiate this object outside the emulator (on my desktop machine) have failed. JDBC on Android is not being recommended on the Net, hence it’s out of the question (I could have provided mock objects very easily that way). So, any ideas?
Share
You cannot test android classes outside the emulator or a real device. If you want to run test cases on your desktop computer, using JVM instead of Dalvik, they should be independent of android classes. You may also change android.jar not to throw exceptions, but I guess this is not what you want.