diff --git a/src/Qowaiv/Globalization/PostalCodeCountryInfoInstances.cs b/src/Qowaiv/Globalization/PostalCodeCountryInfoInstances.cs index a530f90c2..ad4205607 100644 --- a/src/Qowaiv/Globalization/PostalCodeCountryInfoInstances.cs +++ b/src/Qowaiv/Globalization/PostalCodeCountryInfoInstances.cs @@ -514,6 +514,9 @@ public partial class PostalCodeCountryInfo // WF: Wallis And Futuna, http://en.wikipedia.org/wiki/List_of_postal_codes_in_France { Country.WF, New(Country.WF,@"^986[0-9]{2}$") }, + // XK: Kosovo, https://en.wikipedia.org/wiki/Postal_codes_in_Kosovo + { Country.XK, New(Country.XK,@"^[1-7][0-9]{4}$") }, + // YT: Mayotte, http://en.wikipedia.org/wiki/List_of_postal_codes_in_France { Country.YT, New(Country.YT,@"^976[0-9]{2}$") }, diff --git a/test/Qowaiv.UnitTests/Globalization/CountryTest.cs b/test/Qowaiv.UnitTests/Globalization/CountryTest.cs index 0636f487e..aaf296ae5 100644 --- a/test/Qowaiv.UnitTests/Globalization/CountryTest.cs +++ b/test/Qowaiv.UnitTests/Globalization/CountryTest.cs @@ -24,15 +24,15 @@ public void Empty_None_EqualsDefault() } [Test] - public void All_None_259Countries() + public void All_None_260Countries() { - Assert.AreEqual(259, Country.All.Count); + Assert.AreEqual(260, Country.All.Count); } [Test] - public void GetExisting_Januari2016_249Countries() + public void GetExisting_Januari2016_250Countries() { - Assert.AreEqual(249, Country.GetExisting(new Date(2016, 01, 01)).Count()); + Assert.AreEqual(250, Country.GetExisting(new Date(2016, 01, 01)).Count()); } @@ -1175,9 +1175,9 @@ public void GetCurrent_1973_0() } [Test] - public void GetCurrent_None_249() + public void GetCurrent_None_250() { - var exp = 249; + var exp = 250; var act = Country.GetExisting().ToList(); Assert.AreEqual(exp, act.Count); diff --git a/test/Qowaiv.UnitTests/PostalCodeCountryPatternTest.cs b/test/Qowaiv.UnitTests/PostalCodeCountryPatternTest.cs index f62cfe9e6..cffe5481f 100644 --- a/test/Qowaiv.UnitTests/PostalCodeCountryPatternTest.cs +++ b/test/Qowaiv.UnitTests/PostalCodeCountryPatternTest.cs @@ -1160,7 +1160,7 @@ public void IsNotValid_VE_All() // Not possible to generate. // IsNotValid(Country.VE, true, false, 4, 5); } - + /// Tests patterns that should not be valid for Virgin Islands (VG). [Test] public void IsNotValid_VG_All() @@ -1189,6 +1189,13 @@ public void IsNotValid_WF_All() IsNotValid(Country.WF, false, false, 5); } + /// Tests patterns that should not be valid for Kosovo (XK). + [Test] + public void IsNotValid_XK_All() + { + IsNotValid(Country.XK, false, false, 5); + } + /// Tests patterns that should not be valid for Mayotte (YT). [Test] public void IsNotValid_YT_All() diff --git a/tooling/Qowaiv.CodeGenerator/Resources/PostalCode.xls b/tooling/Qowaiv.CodeGenerator/Resources/PostalCode.xls index f84601237..7ac497dc1 100644 Binary files a/tooling/Qowaiv.CodeGenerator/Resources/PostalCode.xls and b/tooling/Qowaiv.CodeGenerator/Resources/PostalCode.xls differ