File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
main/java/net/datafaker/providers/base
test/java/net/datafaker/providers/base Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ private static String detectCountryByLanguage(String language) {
9595 case "hy" -> "AM" ; // Armenia
9696 case "uk" -> "UA" ; // Ukraine
9797 case "ja" -> "JP" ; // Japan
98- case "fa" -> "FR " ; // France
98+ case "fa" -> "IR " ; // Iran
9999 case "ka" -> "GE" ; // Georgia
100100 case "sq" -> "AL" ; // Albania
101101 case "cs" -> "CZ" ; // Czech Republic
Original file line number Diff line number Diff line change @@ -46,6 +46,13 @@ void testValidNumber() throws NumberParseException {
4646 assertThat (util .isValidNumber (parsedNumber )).isTrue ();
4747 }
4848
49+ @ Test
50+ void testLanguageOnlyPersianLocaleUsesIran () {
51+ BaseFaker localFaker = new BaseFaker (new Locale ("fa" ));
52+
53+ assertThat (localFaker .phoneNumber ().countryCodeIso2 ()).isEqualTo ("IR" );
54+ }
55+
4956 @ ParameterizedTest
5057 @ MethodSource ("allSupportedLocales" )
5158 void testAllPhoneNumbers (Locale supportedLocale ) throws NumberParseException {
You can’t perform that action at this time.
0 commit comments