Skip to content

Commit b315673

Browse files
committed
Refactor calling codes to use string arrays for Dominican Republic, Ecuador, Egypt, and Timor-Leste
1 parent f1b70e3 commit b315673

8 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/World.Net.UnitTests/Countries/DominicanRepublicTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public sealed class DominicanRepublicTest
99
private const string DOMINICANREPUBLIC_ISO2_CODE = "DO";
1010
private const string DOMINICANREPUBLIC_ISO3_CODE = "DOM";
1111
private const int DOMINICANREPUBLIC_NUMERIC_CODE = 214;
12-
private const string DOMINICANREPUBLIC_CALLING_CODE = "+1-809, +1-829, +1-849";
12+
private readonly string[] DOMINICANREPUBLIC_CALLING_CODE = ["+1-809", "+1-829", "+1-849"];
1313
private const int DOMINICANREPUBLIC_STATE_COUNT = 32; // 31 provinces + 1 National District
1414
private static readonly string[] VALID_STATE_TYPES = { "Province", "National District" };
1515

src/World.Net.UnitTests/Countries/EcuadorTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public sealed class EcuadorTest
99
private const string ECUADOR_ISO2_CODE = "EC";
1010
private const string ECUADOR_ISO3_CODE = "ECU";
1111
private const int ECUADOR_NUMERIC_CODE = 218;
12-
private const string ECUADOR_CALLING_CODE = "+593";
12+
private readonly string[] ECUADOR_CALLING_CODE = ["+593"];
1313
private const int ECUADOR_STATE_COUNT = 24; // 24 provinces
1414
private static readonly string[] VALID_STATE_TYPES = { "Province" };
1515

src/World.Net.UnitTests/Countries/EgyptTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public sealed class EgyptTest
99
private const string EGYPT_ISO2_CODE = "EG";
1010
private const string EGYPT_ISO3_CODE = "EGY";
1111
private const int EGYPT_NUMERIC_CODE = 818;
12-
private const string EGYPT_CALLING_CODE = "+20";
12+
private readonly string[] EGYPT_CALLING_CODE = ["+20"];
1313
private const int EGYPT_STATE_COUNT = 27; // 27 Governorates
1414
private static readonly string[] VALID_STATE_TYPES = { "Governorate" };
1515

src/World.Net.UnitTests/Countries/TimorLesteTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public sealed class TimorLesteTest
99
private const string TIMORLESTE_ISO2_CODE = "TL";
1010
private const string TIMORLESTE_ISO3_CODE = "TLS";
1111
private const int TIMORLESTE_NUMERIC_CODE = 626;
12-
private const string TIMORLESTE_CALLING_CODE = "+670";
12+
private readonly string[] TIMORLESTE_CALLING_CODE = ["+670"];
1313
private const int TIMORLESTE_STATE_COUNT = 13; // 12 municipalities + 1 special administrative region
1414
private static readonly string[] VALID_STATE_TYPES = { "Municipality", "Special Administrative Region" };
1515

src/World.Net/Countries/DominicanRepublic.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ internal sealed class DominicanRepublic : ICountry
2727
public string ISO3Code { get; } = "DOM";
2828

2929
//<inheritdoc/>
30-
public string CallingCode { get; } = "+1-809, +1-829, +1-849";
30+
public string[] CallingCode { get; } = ["+1-809", "+1-829", "+1-849"];
3131

3232
//<inheritdoc/>
3333
//<inheritdoc/>

src/World.Net/Countries/Ecuador.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ internal sealed class Ecuador : ICountry
2727
public string ISO3Code { get; } = "ECU";
2828

2929
//<inheritdoc/>
30-
public string CallingCode { get; } = "+593";
30+
public string[] CallingCode { get; } = ["+593"];
3131

3232
//<inheritdoc/>
3333
public IEnumerable<State> States =>

src/World.Net/Countries/Egypt.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ internal sealed class Egypt : ICountry
2727
public string ISO3Code { get; } = "EGY";
2828

2929
//<inheritdoc/>
30-
public string CallingCode { get; } = "+20";
30+
public string[] CallingCode { get; } = ["+20"];
3131

3232
//<inheritdoc/>
3333
public IEnumerable<State> States =>

src/World.Net/Countries/TimorLeste.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ internal sealed class TimorLeste : ICountry
2727
public string ISO3Code { get; } = "TLS";
2828

2929
//<inheritdoc/>
30-
public string CallingCode { get; } = "+670";
30+
public string[] CallingCode { get; } = ["+670"];
3131

3232
//<inheritdoc/>
3333
public IEnumerable<State> States =>

0 commit comments

Comments
 (0)