Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
TrevorPilley committed Apr 15, 2024
1 parent fc97b6a commit 6dc535c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 18 deletions.
10 changes: 5 additions & 5 deletions src/PhoneNumbers/DataFiles/MK.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
Expand Down
9 changes: 6 additions & 3 deletions test/PhoneNumbers.Tests/PhoneNumber_ToString_Europe_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down

0 comments on commit 6dc535c

Please sign in to comment.