Merge remote-tracking branch 'origin/master' into do-i18n-plurals
This commit is contained in:
commit
6b5d184f89
|
@ -57,7 +57,7 @@ public class JurisdictionUtilities {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String displayJurisdiction(String s) {
|
public static String displayJurisdiction(String s) {
|
||||||
return displayJurisdiction(CodeSystemUtilities.readCoding(getJurisdictionFromLocale(s)));
|
return displayJurisdiction(CodeSystemUtilities.readCoding(s));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String displayJurisdiction(Coding c) {
|
public static String displayJurisdiction(Coding c) {
|
||||||
|
|
|
@ -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));
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue