Skip to content

Commit

Permalink
Update location_test.cpp
Browse files Browse the repository at this point in the history
added test cases for Palestine
  • Loading branch information
charan-003 authored Nov 15, 2024
1 parent 28114c5 commit 441f1c5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/modules/location_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ CountryAddressesInfo getAddresses(const Locale& locale)
return israelAddresses;
case Locale::es_MX:
return mexicoAddresses;
case Locale::Ar_PS;
return palestineAddresses;
default:
return usaAddresses;
}
Expand Down Expand Up @@ -1121,3 +1123,20 @@ TEST_F(LocationTest, shouldGenerateMexicoStreetAddress)
ASSERT_TRUE(std::ranges::any_of(mexicoStreetNames, [&generatedStreetAddress](const std::string_view& streetName)
{ return generatedStreetAddress.find(streetName) != std::string::npos; }));
}

TEST_F(LocationTest, shouldGeneratePalestineStreet)
{
const auto generatedStreet = street(Locale::Ar_PS);
ASSERT_TRUE(std::ranges::any_of(PalestineStreetNames, [&generatedStreet](const std::string_view& street)
{ return generatedStreet.find(street) != std::string::npos; }));
}

TEST_F(LocationTest, shouldGeneratePalestineStreetAddress)
{
const auto generatedStreetAddress = streetAddress(Locale::Ar_PS);
ASSERT_TRUE(std::ranges::any_of(PalestineStreetNames, [&generatedStreetAddress](const std::string_view& streetName)
{ return generatedStreetAddress.find(streetName) != std::string::npos; }));
}



0 comments on commit 441f1c5

Please sign in to comment.