Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private static String detectCountryByLanguage(String language) {
case "hy" -> "AM"; // Armenia
case "uk" -> "UA"; // Ukraine
case "ja" -> "JP"; // Japan
case "fa" -> "FR"; // France
case "fa" -> "IR"; // Iran
case "ka" -> "GE"; // Georgia
case "sq" -> "AL"; // Albania
case "cs" -> "CZ"; // Czech Republic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ void testValidNumber() throws NumberParseException {
assertThat(util.isValidNumber(parsedNumber)).isTrue();
}

@Test
void testLanguageOnlyPersianLocaleUsesIran() {
BaseFaker localFaker = new BaseFaker(new Locale("fa"));

assertThat(localFaker.phoneNumber().countryCodeIso2()).isEqualTo("IR");
}

@ParameterizedTest
@MethodSource("allSupportedLocales")
void testAllPhoneNumbers(Locale supportedLocale) throws NumberParseException {
Expand Down
Loading