mirror of
https://github.com/Prominence/openweathermap-java-api.git
synced 2026-07-04 03:36:44 +03:00
A lot of refactoring and documentation writing.
This commit is contained in:
+3
-3
@@ -252,7 +252,7 @@ public class FiveDayThreeHourStepForecastIntegrationTest extends ApiTest {
|
||||
public void whenGetForecastByCoordinatesRequestAsJava_thenReturnNotNull() {
|
||||
final Forecast forecast = getClient()
|
||||
.forecast5Day3HourStep()
|
||||
.byCoordinate(Coordinate.forValues(5, 5))
|
||||
.byCoordinate(Coordinate.withValues(5, 5))
|
||||
.language(Language.ENGLISH)
|
||||
.unitSystem(UnitSystem.METRIC)
|
||||
.count(15)
|
||||
@@ -277,7 +277,7 @@ public class FiveDayThreeHourStepForecastIntegrationTest extends ApiTest {
|
||||
public void whenGetForecastByCoordinatesRequestAsJSON_thenReturnNotNull() {
|
||||
final String forecastJson = getClient()
|
||||
.forecast5Day3HourStep()
|
||||
.byCoordinate(Coordinate.forValues(5, 5))
|
||||
.byCoordinate(Coordinate.withValues(5, 5))
|
||||
.language(Language.SPANISH)
|
||||
.unitSystem(UnitSystem.IMPERIAL)
|
||||
.count(15)
|
||||
@@ -291,7 +291,7 @@ public class FiveDayThreeHourStepForecastIntegrationTest extends ApiTest {
|
||||
public void whenGetForecastByCoordinatesRequestAsXML_thenReturnNotNull() {
|
||||
final String forecastXml = getClient()
|
||||
.forecast5Day3HourStep()
|
||||
.byCoordinate(Coordinate.forValues(5, 5))
|
||||
.byCoordinate(Coordinate.withValues(5, 5))
|
||||
.language(Language.ENGLISH)
|
||||
.unitSystem(UnitSystem.METRIC)
|
||||
.retrieve()
|
||||
|
||||
+18
-10
@@ -44,7 +44,15 @@ public class MultipleResultCurrentWeatherIntegrationTest extends ApiTest {
|
||||
final List<Weather> weatherList = getClient()
|
||||
.currentWeather()
|
||||
.multiple()
|
||||
.byRectangle(CoordinateRectangle.forValues(12, 32, 15, 37), 10)
|
||||
.byRectangle(
|
||||
new CoordinateRectangle.Builder()
|
||||
.setLongitudeLeft(12)
|
||||
.setLatitudeBottom(32)
|
||||
.setLongitudeRight(15)
|
||||
.setLatitudeTop(37)
|
||||
.build(),
|
||||
10
|
||||
)
|
||||
.language(Language.ROMANIAN)
|
||||
.unitSystem(UnitSystem.METRIC)
|
||||
.retrieve()
|
||||
@@ -69,7 +77,7 @@ public class MultipleResultCurrentWeatherIntegrationTest extends ApiTest {
|
||||
final String weatherJson = getClient()
|
||||
.currentWeather()
|
||||
.multiple()
|
||||
.byRectangle(CoordinateRectangle.forValues(12, 32, 15, 37), 10)
|
||||
.byRectangle(CoordinateRectangle.withValues(12, 32, 15, 37), 10)
|
||||
.language(Language.ROMANIAN)
|
||||
.unitSystem(UnitSystem.METRIC)
|
||||
.retrieve()
|
||||
@@ -83,7 +91,7 @@ public class MultipleResultCurrentWeatherIntegrationTest extends ApiTest {
|
||||
final List<Weather> weatherList = getClient()
|
||||
.currentWeather()
|
||||
.multiple()
|
||||
.byCitiesInCycle(Coordinate.forValues(55.5, 37.5))
|
||||
.byCitiesInCycle(Coordinate.withValues(55.5, 37.5))
|
||||
.language(Language.GERMAN)
|
||||
.unitSystem(UnitSystem.IMPERIAL)
|
||||
.retrieve()
|
||||
@@ -109,7 +117,7 @@ public class MultipleResultCurrentWeatherIntegrationTest extends ApiTest {
|
||||
final String weatherJson = getClient()
|
||||
.currentWeather()
|
||||
.multiple()
|
||||
.byCitiesInCycle(Coordinate.forValues(55.5, 37.5))
|
||||
.byCitiesInCycle(Coordinate.withValues(55.5, 37.5))
|
||||
.language(Language.GERMAN)
|
||||
.unitSystem(UnitSystem.IMPERIAL)
|
||||
.retrieve()
|
||||
@@ -123,7 +131,7 @@ public class MultipleResultCurrentWeatherIntegrationTest extends ApiTest {
|
||||
final String weatherXml = getClient()
|
||||
.currentWeather()
|
||||
.multiple()
|
||||
.byCitiesInCycle(Coordinate.forValues(55.5, 37.5))
|
||||
.byCitiesInCycle(Coordinate.withValues(55.5, 37.5))
|
||||
.language(Language.GERMAN)
|
||||
.unitSystem(UnitSystem.IMPERIAL)
|
||||
.retrieve()
|
||||
@@ -138,7 +146,7 @@ public class MultipleResultCurrentWeatherIntegrationTest extends ApiTest {
|
||||
final List<Weather> weatherList = getClient()
|
||||
.currentWeather()
|
||||
.multiple()
|
||||
.byCitiesInCycle(Coordinate.forValues(55.5, 37.5), 10)
|
||||
.byCitiesInCycle(Coordinate.withValues(55.5, 37.5), 10)
|
||||
.language(Language.GERMAN)
|
||||
.unitSystem(UnitSystem.IMPERIAL)
|
||||
.retrieve()
|
||||
@@ -164,7 +172,7 @@ public class MultipleResultCurrentWeatherIntegrationTest extends ApiTest {
|
||||
final String weatherJson = getClient()
|
||||
.currentWeather()
|
||||
.multiple()
|
||||
.byCitiesInCycle(Coordinate.forValues(55.5, 37.5), 10)
|
||||
.byCitiesInCycle(Coordinate.withValues(55.5, 37.5), 10)
|
||||
.language(Language.GERMAN)
|
||||
.unitSystem(UnitSystem.IMPERIAL)
|
||||
.retrieve()
|
||||
@@ -178,7 +186,7 @@ public class MultipleResultCurrentWeatherIntegrationTest extends ApiTest {
|
||||
final String weatherXml = getClient()
|
||||
.currentWeather()
|
||||
.multiple()
|
||||
.byCitiesInCycle(Coordinate.forValues(55.5, 37.5), 10)
|
||||
.byCitiesInCycle(Coordinate.withValues(55.5, 37.5), 10)
|
||||
.language(Language.GERMAN)
|
||||
.unitSystem(UnitSystem.IMPERIAL)
|
||||
.retrieve()
|
||||
@@ -192,7 +200,7 @@ public class MultipleResultCurrentWeatherIntegrationTest extends ApiTest {
|
||||
final CompletableFuture<List<Weather>> weatherListFuture = getClient()
|
||||
.currentWeather()
|
||||
.multiple()
|
||||
.byCitiesInCycle(Coordinate.forValues(55.5, 37.5), 10)
|
||||
.byCitiesInCycle(Coordinate.withValues(55.5, 37.5), 10)
|
||||
.language(Language.GERMAN)
|
||||
.unitSystem(UnitSystem.IMPERIAL)
|
||||
.retrieveAsync()
|
||||
@@ -209,7 +217,7 @@ public class MultipleResultCurrentWeatherIntegrationTest extends ApiTest {
|
||||
final CompletableFuture<String> weatherFuture = getClient()
|
||||
.currentWeather()
|
||||
.multiple()
|
||||
.byCitiesInCycle(Coordinate.forValues(55.5, 37.5), 10)
|
||||
.byCitiesInCycle(Coordinate.withValues(55.5, 37.5), 10)
|
||||
.language(Language.GERMAN)
|
||||
.unitSystem(UnitSystem.IMPERIAL)
|
||||
.retrieveAsync()
|
||||
|
||||
+6
-6
@@ -298,7 +298,7 @@ public class SingleResultCurrentWeatherIntegrationTest extends ApiTest {
|
||||
final Weather weather = getClient()
|
||||
.currentWeather()
|
||||
.single()
|
||||
.byCoordinate(Coordinate.forValues(5, 5))
|
||||
.byCoordinate(Coordinate.withValues(5, 5))
|
||||
.unitSystem(UnitSystem.METRIC)
|
||||
.retrieve()
|
||||
.asJava();
|
||||
@@ -320,7 +320,7 @@ public class SingleResultCurrentWeatherIntegrationTest extends ApiTest {
|
||||
final String weatherJson = getClient()
|
||||
.currentWeather()
|
||||
.single()
|
||||
.byCoordinate(Coordinate.forValues(5, 5))
|
||||
.byCoordinate(Coordinate.withValues(5, 5))
|
||||
.unitSystem(UnitSystem.METRIC)
|
||||
.retrieve()
|
||||
.asJSON();
|
||||
@@ -333,7 +333,7 @@ public class SingleResultCurrentWeatherIntegrationTest extends ApiTest {
|
||||
final String weatherXml = getClient()
|
||||
.currentWeather()
|
||||
.single()
|
||||
.byCoordinate(Coordinate.forValues(5, 5))
|
||||
.byCoordinate(Coordinate.withValues(5, 5))
|
||||
.unitSystem(UnitSystem.METRIC)
|
||||
.retrieve()
|
||||
.asXML();
|
||||
@@ -346,7 +346,7 @@ public class SingleResultCurrentWeatherIntegrationTest extends ApiTest {
|
||||
final String weatherHtml = getClient()
|
||||
.currentWeather()
|
||||
.single()
|
||||
.byCoordinate(Coordinate.forValues(5, 5))
|
||||
.byCoordinate(Coordinate.withValues(5, 5))
|
||||
.unitSystem(UnitSystem.METRIC)
|
||||
.retrieve()
|
||||
.asHTML();
|
||||
@@ -550,7 +550,7 @@ public class SingleResultCurrentWeatherIntegrationTest extends ApiTest {
|
||||
client
|
||||
.currentWeather()
|
||||
.multiple()
|
||||
.byCitiesInCycle(Coordinate.forValues(34.53, 66.74), 10)
|
||||
.byCitiesInCycle(Coordinate.withValues(34.53, 66.74), 10)
|
||||
.retrieve()
|
||||
.asJSON();
|
||||
}
|
||||
@@ -560,7 +560,7 @@ public class SingleResultCurrentWeatherIntegrationTest extends ApiTest {
|
||||
getClient()
|
||||
.currentWeather()
|
||||
.multiple()
|
||||
.byCitiesInCycle(Coordinate.forValues(90.00, 66.74), 10)
|
||||
.byCitiesInCycle(Coordinate.withValues(90.00, 66.74), 10)
|
||||
.retrieve()
|
||||
.asJava();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user