diff --git a/DwdWeatherLibrary/DwdWeatherLibrary.py b/DwdWeatherLibrary/DwdWeatherLibrary.py index 064f605..422fd29 100644 --- a/DwdWeatherLibrary/DwdWeatherLibrary.py +++ b/DwdWeatherLibrary/DwdWeatherLibrary.py @@ -65,3 +65,7 @@ def get_nearest_station(self, address : str): location = self._GEOLOCATOR.geocode(address) closest_station = self._DW_CLIENT.nearest_station(location.longitude, location.latitude) return closest_station + + @keyword(name="Get current temperature") + def get_current_temperature_from_address(self, address: str): + return [] \ No newline at end of file diff --git a/tests/robot/get_current_temperature.robot b/tests/robot/get_current_temperature.robot new file mode 100644 index 0000000..d41f99d --- /dev/null +++ b/tests/robot/get_current_temperature.robot @@ -0,0 +1,18 @@ +*** Settings *** +Library DwdWeatherLibrary +Force Tags acceptance_test + +*** Test Cases *** +Test 'Get current temperature from station' for address + [Template] Execute 'Get current temperature from station' + 33332 Gütersloh + Aachen + Berlin + +*** Keywords *** +Execute 'Get current temperature from station' + [Arguments] ${address} + ${station} Get station closest to address ${address} + should not be empty ${station} No station found for address:\t${address} + ${current_temperature} Get current temperature ${station} + Should Not Be Empty ${current_temperature} No temperature found for station:\t${station}[name] \ No newline at end of file