diff --git a/src/test/java/com/github/prominence/openweathermap/api/test/CurrentWeatherIntegrationTest.java b/src/test/java/com/github/prominence/openweathermap/api/test/CurrentWeatherIntegrationTest.java index ea7e6c1..3a0cc56 100644 --- a/src/test/java/com/github/prominence/openweathermap/api/test/CurrentWeatherIntegrationTest.java +++ b/src/test/java/com/github/prominence/openweathermap/api/test/CurrentWeatherIntegrationTest.java @@ -187,6 +187,36 @@ public class CurrentWeatherIntegrationTest extends ApiTest { System.out.println(weatherFuture.get()); } + @Test + public void whenGetAnySingleCurrentWeatherAsyncRequestAsJson_thenReturnNotNull() throws ExecutionException, InterruptedException { + final CompletableFuture weatherFuture = getClient() + .currentWeather() + .single() + .byZipCodeAndCountry("220015", "by") + .language(Language.RUSSIAN) + .unit(Unit.METRIC_SYSTEM) + .retrieveAsync() + .asJSON(); + + assert weatherFuture != null; + System.out.println(weatherFuture.get()); + } + + @Test + public void whenGetAnySingleCurrentWeatherAsyncRequestAsHtml_thenReturnNotNull() throws ExecutionException, InterruptedException { + final CompletableFuture weatherFuture = getClient() + .currentWeather() + .single() + .byZipCodeAndCountry("220015", "by") + .language(Language.RUSSIAN) + .unit(Unit.METRIC_SYSTEM) + .retrieveAsync() + .asHTML(); + + assert weatherFuture != null; + System.out.println(weatherFuture.get()); + } + @Test public void whenGetMultipleCurrentWeatherByCoordinateRequestAsJava_thenReturnNotNull() { final List weatherList = getClient() @@ -329,4 +359,34 @@ public class CurrentWeatherIntegrationTest extends ApiTest { assert weatherFuture != null; System.out.println(weatherFuture.get()); } + + @Test + public void whenGetMultipleCurrentWeatherByCoordinateAndServerClusteringAsyncRequestAsJson_thenReturnNotNull() throws ExecutionException, InterruptedException { + final CompletableFuture weatherFuture = getClient() + .currentWeather() + .multiple() + .byCitiesInCycle(new Coordinate(55.5, 37.5), 10, true) + .language(Language.GERMAN) + .unit(Unit.IMPERIAL_SYSTEM) + .retrieveAsync() + .asJSON(); + + assert weatherFuture != null; + System.out.println(weatherFuture.get()); + } + + @Test + public void whenGetMultipleCurrentWeatherByCoordinateAndServerClusteringAsyncRequestAsHtml_thenReturnNotNull() throws ExecutionException, InterruptedException { + final CompletableFuture weatherFuture = getClient() + .currentWeather() + .multiple() + .byCitiesInCycle(new Coordinate(55.5, 37.5), 10, true) + .language(Language.GERMAN) + .unit(Unit.IMPERIAL_SYSTEM) + .retrieveAsync() + .asHTML(); + + assert weatherFuture != null; + System.out.println(weatherFuture.get()); + } }