|
|
@ -122,7 +122,10 @@ class RepeatRuleToStringTest : InjectingTestCase() {
|
|
|
|
private fun toString(language: String?, rrule: String): String? {
|
|
|
|
private fun toString(language: String?, rrule: String): String? {
|
|
|
|
return try {
|
|
|
|
return try {
|
|
|
|
val locale = language?.let { Locale.forLanguageTag(it) } ?: Locale.getDefault()
|
|
|
|
val locale = language?.let { Locale.forLanguageTag(it) } ?: Locale.getDefault()
|
|
|
|
RepeatRuleToString(context, locale, firebase)
|
|
|
|
val configuration = context.resources.configuration.apply {
|
|
|
|
|
|
|
|
setLocale(locale)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
RepeatRuleToString(context.createConfigurationContext(configuration), locale, firebase)
|
|
|
|
.toString(rrule)
|
|
|
|
.toString(rrule)
|
|
|
|
} catch (e: ParseException) {
|
|
|
|
} catch (e: ParseException) {
|
|
|
|
throw RuntimeException(e)
|
|
|
|
throw RuntimeException(e)
|
|
|
|