How can I write a test for the rotation of the activit?
In the general case, it would be great to test the re-creation of activations on any configuration change. Generally perfect if this can be done in a robolectric.
I need to test the correct behavior of the retain fragment. If you call activity.recreate() in the robo-infrastructure, then the fragment is also recreated there, which is not true, in my case.
If you do this:
activity.baseContext.resources.updateConfiguration(newConfig, activity.resources.displayMetrics) It seems to be working as I expect, but doubts are overwhelming that it works out exactly as it will in real life.