Implemented free-plan weather forecast retrieving.

This commit is contained in:
2021-03-22 01:46:44 +03:00
parent ea39441e83
commit f7741e1df6
15 changed files with 1008 additions and 25 deletions
@@ -25,22 +25,23 @@ package com.github.prominence.openweathermap.api.request.forecast.free;
import com.github.prominence.openweathermap.api.ApiTest;
import com.github.prominence.openweathermap.api.enums.Language;
import com.github.prominence.openweathermap.api.enums.UnitSystem;
import com.github.prominence.openweathermap.api.model.forecast.Forecast;
import org.junit.Test;
public class FiveDayThreeHourStepForecastIntegrationTest extends ApiTest {
@Test
public void whenGetTest_thenReturnNotNull() {
final String weatherJSON = getClient()
final Forecast forecast = getClient()
.forecast5Day3HourStep()
.byCityName("Minsk")
.language(Language.RUSSIAN)
.language(Language.ENGLISH)
.unitSystem(UnitSystem.METRIC)
.count(15)
.retrieve()
.asJSON();
.asJava();
assert weatherJSON != null;
System.out.println(weatherJSON);
assert forecast != null;
System.out.println(forecast);
}
}