mirror of https://github.com/apache/jclouds.git
Fix type of location coordinates (#36)
This commit is contained in:
parent
ac175f069f
commit
590d0509cc
|
@ -42,16 +42,16 @@ public abstract class Location {
|
||||||
/**
|
/**
|
||||||
* The longitude of the datacenter
|
* The longitude of the datacenter
|
||||||
*/
|
*/
|
||||||
public abstract double longitude();
|
public abstract String longitude();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The latitude of the datacenter
|
* The latitude of the datacenter
|
||||||
*/
|
*/
|
||||||
public abstract double latitude();
|
public abstract String latitude();
|
||||||
|
|
||||||
@SerializedNames({"id", "name", "displayName", "longitude", "latitude"})
|
@SerializedNames({"id", "name", "displayName", "longitude", "latitude"})
|
||||||
public static Location create(final String id, final String name, final String displayName, final double longitude,
|
public static Location create(final String id, final String name, final String displayName, final String longitude,
|
||||||
final double latitude) {
|
final String latitude) {
|
||||||
|
|
||||||
return new AutoValue_Location(id, name, displayName, longitude, latitude);
|
return new AutoValue_Location(id, name, displayName, longitude, latitude);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class LocationApiMockTest extends BaseAzureComputeApiMockTest {
|
||||||
final LocationApi locationAPI = api.getLocationApi();
|
final LocationApi locationAPI = api.getLocationApi();
|
||||||
assertEquals(locationAPI.list(), ImmutableList.of(
|
assertEquals(locationAPI.list(), ImmutableList.of(
|
||||||
Location.create("/subscriptions/SUBSCRIPTIONID/locations/eastasia",
|
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");
|
assertSent(server, "GET", "/subscriptions/SUBSCRIPTIONID/locations?api-version=2015-11-01");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue