Merge remote-tracking branch 'origin/master' into do-i18n-plurals

This commit is contained in:
dotasek 2022-11-07 14:52:40 -05:00
commit 6b5d184f89
2 changed files with 25 additions and 1 deletions

View File

@ -57,7 +57,7 @@ public class JurisdictionUtilities {
}
public static String displayJurisdiction(String s) {
return displayJurisdiction(CodeSystemUtilities.readCoding(getJurisdictionFromLocale(s)));
return displayJurisdiction(CodeSystemUtilities.readCoding(s));
}
public static String displayJurisdiction(Coding c) {

View File

@ -0,0 +1,24 @@
package org.hl7.fhir.r5.terminology;
import org.hl7.fhir.r5.terminologies.JurisdictionUtilities;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class JurisdictionUtilitiesTests {
@ParameterizedTest
@CsvSource({
"uv,Global (Whole world)",
"world,Global (Whole world)",
"global,Global (Whole world)",
"ar,Argentina",
"bf,Burkina Faso"
})
void testDisplayJurisdiction(String cliString, String expectedDisplayString) {
final String jurisdiction = JurisdictionUtilities.getJurisdictionFromLocale(cliString);
assertEquals(expectedDisplayString, JurisdictionUtilities.displayJurisdiction(jurisdiction));
}
}