Fix type of location coordinates (#36)

This commit is contained in:
Ignasi Barrera 2019-06-15 09:01:13 +02:00 committed by GitHub
parent f5806d0488
commit 215df85105
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -42,16 +42,16 @@ public abstract class Location {
/**
* The longitude of the datacenter
*/
public abstract double longitude();
public abstract String longitude();
/**
* The latitude of the datacenter
*/
public abstract double latitude();
public abstract String latitude();
@SerializedNames({"id", "name", "displayName", "longitude", "latitude"})
public static Location create(final String id, final String name, final String displayName, final double longitude,
final double latitude) {
public static Location create(final String id, final String name, final String displayName, final String longitude,
final String latitude) {
return new AutoValue_Location(id, name, displayName, longitude, latitude);
}

View File

@ -33,7 +33,7 @@ public class LocationApiMockTest extends BaseAzureComputeApiMockTest {
final LocationApi locationAPI = api.getLocationApi();
assertEquals(locationAPI.list(), ImmutableList.of(
Location.create("/subscriptions/SUBSCRIPTIONID/locations/eastasia",
"eastasia", "East Asia", 114.188, 22.267)
"eastasia", "East Asia", "114.188", "22.267")
));
assertSent(server, "GET", "/subscriptions/SUBSCRIPTIONID/locations?api-version=2015-11-01");
}