I need to customize the RobolectricTestRunner from Robolectric project, but I found a strange behaviour that I don't understand:
RobolectricTestRunner
contains the methodBlock
which calls
setUpApplicationState(bootstrappedMethod, parallelUniverseInterface, strictI18n, systemResourceLoader, appManifest, config);
the method executes setUpApplicationState
of ParallelUniverse class.
At line 146, setupApplicationState
executes application.onCreate();
When I debug the application, when I check the Robolectric.application value at line 146 I see that it's created successfully, but if I check the same value in the RobolectricTestRunner class, after the line: 220, Robolectric.application is null...
Why? it's a static value.. I can't understand that!