Q:

How to set Intent and Configuration before starting activity in Robolectric

My Activity -that i want to test- has to have extras before starting which had to be located in Intent. How can i add them before lunching the activity in testing?
And the same function is also needed to set the "Locale" in "Configuration" in Activity.
I think that we have to use shadowActivity but i could not find any example for that. 
Please help & Thank you!

A:

About the extras, I don't see any problem. Just create a new Intent, put all the extras and set in our activity.
Intent intent = new Intent();
intent.putExtra(..,..);
activity.setIntent(intent);
activity.onCreate(null);

