vendredi 1 avril 2016

Using Robolectric with an Application class

I am getting started with using Robolectric for testing my android app. A bit of context, my app is already built and the repo is fairly large.

I setup my IDE as instructed in the Robolectric documentation here. But trying to run the tests, I ended up with errors in my application class. It complains that some or the other dependency is missing or running into weird states which I can't explain.(Not a great start I guess).

Is there a way, I can basically mock the application class or have a dummy application class ? I tried to find examples but it's not clear, where I am supposed to specify the class. Any help is much appreciated.

Aucun commentaire:

Enregistrer un commentaire