I use the following project structure:
Main
|_ Project
|_ build.gradle
|_ Library
|_ build.gradle
|_ Settings.gradle
I included Robolectric 2.3 in my project and I created a basic unit test. The problem is that every test fails (NullPointerException), because I have some resources inside my library that cannot be loaded from unit tests. I read that Robolectric should work correctly with resource files inside library projects with 2.0.
I can not make it work. In my IntelliJ IDEA Project configuration, in the "Test Configuration" section, the working directory is installed in the project module (I also have resource files in my Project module).
Thanks, I hope someone from Robolectric can confirm me if libraries with resource files are supported.
source
share