From 6dc535cdc71c4505d69e4e5b0a42f9a3f35a9e57 Mon Sep 17 00:00:00 2001 From: Trevor Pilley Date: Wed, 10 Apr 2024 18:49:16 +0000 Subject: [PATCH] updates --- src/PhoneNumbers/DataFiles/MK.txt | 10 +++++----- ...PhoneNumberParserTests_MK_GeographicNumber.cs | 16 ++++++++-------- ...berParserTests_MK_NonGeographicPhoneNumber.cs | 4 ++-- .../PhoneNumber_ToString_Europe_Tests.cs | 9 ++++++--- 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/src/PhoneNumbers/DataFiles/MK.txt b/src/PhoneNumbers/DataFiles/MK.txt index bf3b7fb1..1eb126dc 100644 --- a/src/PhoneNumbers/DataFiles/MK.txt +++ b/src/PhoneNumbers/DataFiles/MK.txt @@ -2,17 +2,17 @@ # - https://www.itu.int/dms_pub/itu-t/oth/02/02/T02020000CE0002PDFE.pdf G|2|Skopje|0000000-9999999| G|31|Kumanovo, Kriva Palanka, Kratovo|200000-999999| -G|32|Stip, Probistip, Sveti Nikole, Radovis|200000-999999| -G|33|Kocani, Berovo, Delcevo, Vinica|200000-999999| +G|32|Štip, Probištip, Sveti Nikole, Radoviš|200000-999999| +G|33|Kočani, Berovo, Delcevo, Vinica|200000-999999| G|34|Gevgelija, Valandovo, Strumica, Dojran|200000-999999| G|42|Gostivar|200000-999999| G|43|Veles, Kavadarci, Negotino|200000-999999| G|44|Tetovo|200000-999999| -G|45|Kicevo, Makedonski Brod|200000-999999| +G|45|Kičevo, Makedonski Brod|200000-999999| G|46|Ohrid, Struga, Debar|200000-999999| G|47|Bitola, Demir Hisar, Resen|200000-999999| -G|48|Prilep, Krusevo|200000-999999| +G|48|Prilep, Kruševo|200000-999999| N|500||00000-99999|R M|70-79||200000-999999| -N|800||00000-99999| +N|800||00000-99999|F N|801-899||00000-99999|S diff --git a/test/PhoneNumbers.Data.Tests/Parsers/DefaultPhoneNumberParserTests_MK_GeographicNumber.cs b/test/PhoneNumbers.Data.Tests/Parsers/DefaultPhoneNumberParserTests_MK_GeographicNumber.cs index 60934221..7f2eacc1 100644 --- a/test/PhoneNumbers.Data.Tests/Parsers/DefaultPhoneNumberParserTests_MK_GeographicNumber.cs +++ b/test/PhoneNumbers.Data.Tests/Parsers/DefaultPhoneNumberParserTests_MK_GeographicNumber.cs @@ -30,10 +30,10 @@ public void Parse_Known_GeographicPhoneNumber_2_NationalDestinationCode(string v [Theory] [InlineData("031200000", "31", "200000", "Kumanovo, Kriva Palanka, Kratovo")] [InlineData("031999999", "31", "999999", "Kumanovo, Kriva Palanka, Kratovo")] - [InlineData("032200000", "32", "200000", "Stip, Probistip, Sveti Nikole, Radovis")] - [InlineData("032999999", "32", "999999", "Stip, Probistip, Sveti Nikole, Radovis")] - [InlineData("033200000", "33", "200000", "Kocani, Berovo, Delcevo, Vinica")] - [InlineData("033999999", "33", "999999", "Kocani, Berovo, Delcevo, Vinica")] + [InlineData("032200000", "32", "200000", "Štip, Probištip, Sveti Nikole, Radoviš")] + [InlineData("032999999", "32", "999999", "Štip, Probištip, Sveti Nikole, Radoviš")] + [InlineData("033200000", "33", "200000", "Kočani, Berovo, Delcevo, Vinica")] + [InlineData("033999999", "33", "999999", "Kočani, Berovo, Delcevo, Vinica")] [InlineData("034200000", "34", "200000", "Gevgelija, Valandovo, Strumica, Dojran")] [InlineData("034999999", "34", "999999", "Gevgelija, Valandovo, Strumica, Dojran")] public void Parse_Known_GeographicPhoneNumber_3X_NationalDestinationCode(string value, string NationalDestinationCode, string subscriberNumber, string geographicArea) @@ -60,14 +60,14 @@ public void Parse_Known_GeographicPhoneNumber_3X_NationalDestinationCode(string [InlineData("043999999", "43", "999999", "Veles, Kavadarci, Negotino")] [InlineData("044200000", "44", "200000", "Tetovo")] [InlineData("044999999", "44", "999999", "Tetovo")] - [InlineData("045200000", "45", "200000", "Kicevo, Makedonski Brod")] - [InlineData("045999999", "45", "999999", "Kicevo, Makedonski Brod")] + [InlineData("045200000", "45", "200000", "Kičevo, Makedonski Brod")] + [InlineData("045999999", "45", "999999", "Kičevo, Makedonski Brod")] [InlineData("046200000", "46", "200000", "Ohrid, Struga, Debar")] [InlineData("046999999", "46", "999999", "Ohrid, Struga, Debar")] [InlineData("047200000", "47", "200000", "Bitola, Demir Hisar, Resen")] [InlineData("047999999", "47", "999999", "Bitola, Demir Hisar, Resen")] - [InlineData("048200000", "48", "200000", "Prilep, Krusevo")] - [InlineData("048999999", "48", "999999", "Prilep, Krusevo")] + [InlineData("048200000", "48", "200000", "Prilep, Kruševo")] + [InlineData("048999999", "48", "999999", "Prilep, Kruševo")] public void Parse_Known_GeographicPhoneNumber_4X_NationalDestinationCode(string value, string NationalDestinationCode, string subscriberNumber, string geographicArea) { var parseResult = s_parser.Parse(value); diff --git a/test/PhoneNumbers.Data.Tests/Parsers/DefaultPhoneNumberParserTests_MK_NonGeographicPhoneNumber.cs b/test/PhoneNumbers.Data.Tests/Parsers/DefaultPhoneNumberParserTests_MK_NonGeographicPhoneNumber.cs index d7ef4649..42e0f871 100644 --- a/test/PhoneNumbers.Data.Tests/Parsers/DefaultPhoneNumberParserTests_MK_NonGeographicPhoneNumber.cs +++ b/test/PhoneNumbers.Data.Tests/Parsers/DefaultPhoneNumberParserTests_MK_NonGeographicPhoneNumber.cs @@ -10,7 +10,7 @@ public class DefaultPhoneNumberParserTests_MK_NonGeographicPhoneNumber [Theory] [InlineData("080000000", "800", "00000")] [InlineData("080099999", "800", "99999")] - public void Parse_Known_NonGeographicPhoneNumber_8XX_NationalDestinationCode(string value, string NationalDestinationCode, string subscriberNumber) + public void Parse_Known_NonGeographicPhoneNumber_Freephone(string value, string NationalDestinationCode, string subscriberNumber) { var parseResult = s_parser.Parse(value); parseResult.ThrowIfFailure(); @@ -22,7 +22,7 @@ public void Parse_Known_NonGeographicPhoneNumber_8XX_NationalDestinationCode(str var nonGeographicPhoneNumber = (NonGeographicPhoneNumber)phoneNumber; Assert.Equal(CountryInfo.NorthMacedonia, nonGeographicPhoneNumber.Country); - Assert.False(nonGeographicPhoneNumber.IsFreephone); + Assert.True(nonGeographicPhoneNumber.IsFreephone); Assert.False(nonGeographicPhoneNumber.IsMachineToMachine); Assert.False(nonGeographicPhoneNumber.IsPremiumRate); Assert.False(nonGeographicPhoneNumber.IsSharedCost); diff --git a/test/PhoneNumbers.Tests/PhoneNumber_ToString_Europe_Tests.cs b/test/PhoneNumbers.Tests/PhoneNumber_ToString_Europe_Tests.cs index 475b6e0a..d0fb6cb8 100644 --- a/test/PhoneNumbers.Tests/PhoneNumber_ToString_Europe_Tests.cs +++ b/test/PhoneNumbers.Tests/PhoneNumber_ToString_Europe_Tests.cs @@ -249,9 +249,12 @@ public void Netherlands_Numbers(string input, string format, string expected) => Assert.Equal(expected, PhoneNumber.Parse(input).ToString(format)); [Theory] - [InlineData("+38923289200", "E.123", "+389 23 289 200")] - [InlineData("+38923289200", "N", "023 289 200")] - [InlineData("+38923289200", "RFC3966", "tel:+389-23-289-200")] + [InlineData("+38923289200", "E.123", "+389 2 328 9200")] + [InlineData("+38970221213", "E.123", "+389 70 221 213")] + [InlineData("+38923289200", "N", "02 328 9200")] + [InlineData("+38970221213", "N", "070 221 213")] + [InlineData("+38923289200", "RFC3966", "tel:+389-2-328-9200")] + [InlineData("+38970221213", "RFC3966", "tel:+389-70-221-213")] public void NorthMacedonia_Numbers(string input, string format, string expected) => Assert.Equal(expected, PhoneNumber.Parse(input).ToString(format));