In a test, we want to test string formatting in English and French. How to specify the locale in robolectric?
The method in this post doesn't work: Change language programmatically in Android
In a test, we want to test string formatting in English and French. How to specify the locale in robolectric?
The method in this post doesn't work: Change language programmatically in Android
Robolectric now includes an @Config
annotation that you can put on your unit tests to specify things like this. See here for more info.
Here is what did when unit tests involve locale: