Our weather console application should allow users to search for the city for which they wish to know the weather. This feature should handle a wide range of city names from around the world, including those with non-English characters and cities that share a name but are located in different regions or countries.
Here are the tasks that we need to address for this issue:
City Search Functionality: Implement a function that can take a city name as input and retrieve city data, potentially from multiple matching entries.
City Name Handling: Ensure that the function can handle city names in various languages, and that it is case-insensitive to enhance user experience.
Duplicate City Names: If there are multiple cities with the same name, the function should present a list of options to the user, clearly distinguishing each city (e.g., by country or region).
Error Handling: Implement robust error handling for potential issues such as invalid city names or data unavailability.
Testing: Write tests to verify that the city search function works as expected under different conditions.
Acceptance Criteria:
Users can enter a city name and the application retrieves the correct city or a list of matching cities.
The function correctly handles city names in various languages and is case-insensitive.
When multiple cities share a name, the application correctly offers the user a choice.
Errors are properly handled and do not crash the application. The user is informed when city data cannot be retrieved.
Tests confirm the correctness of the city search function and its resilience to common failure scenarios.
Our weather console application should allow users to search for the city for which they wish to know the weather. This feature should handle a wide range of city names from around the world, including those with non-English characters and cities that share a name but are located in different regions or countries.
Here are the tasks that we need to address for this issue:
Acceptance Criteria: