I am trying to implement robolectric testing in an existing app. I can run simple static tests but when I add testing with ActiveAndroid I get NullPointerExceptions, I think Act
Ah, we had a similar issue. We resolved it by next Robolectric feature http://robolectric.org/custom-test-runner/
We moved created method:
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
installMultiDex();
}
protected void installMultiDex() {
MultiDex.install(this);
}
And overrided it in the test application:
@Override
protected void installMultiDex() {
//don't do anything
}