This commit is contained in:
Rubenlagus 2017-01-26 01:37:54 +01:00 committed by Ruben Bermudez
parent 75c3a48766
commit a565b5fdd5
2 changed files with 6 additions and 6 deletions

View File

@ -16,19 +16,19 @@ public class Location implements BotApiObject {
private static final String LATITUDE_FIELD = "latitude"; private static final String LATITUDE_FIELD = "latitude";
@JsonProperty(LONGITUDE_FIELD) @JsonProperty(LONGITUDE_FIELD)
private Double longitude; ///< Longitude as defined by sender private Float longitude; ///< Longitude as defined by sender
@JsonProperty(LATITUDE_FIELD) @JsonProperty(LATITUDE_FIELD)
private Double latitude; ///< Latitude as defined by sender private Float latitude; ///< Latitude as defined by sender
public Location() { public Location() {
super(); super();
} }
public Double getLongitude() { public Float getLongitude() {
return longitude; return longitude;
} }
public Double getLatitude() { public Float getLatitude() {
return latitude; return latitude;
} }

View File

@ -172,8 +172,8 @@ public class TestDeserialization {
Assert.assertEquals("offset", inlineQuery.getOffset()); Assert.assertEquals("offset", inlineQuery.getOffset());
assertFromUser(inlineQuery.getFrom()); assertFromUser(inlineQuery.getFrom());
Assert.assertNotNull(inlineQuery.getLocation()); Assert.assertNotNull(inlineQuery.getLocation());
Assert.assertEquals(Double.valueOf("0.234242534"), inlineQuery.getLocation().getLatitude()); Assert.assertEquals(Float.valueOf("0.234242534"), inlineQuery.getLocation().getLatitude());
Assert.assertEquals(Double.valueOf("0.234242534"), inlineQuery.getLocation().getLongitude()); Assert.assertEquals(Float.valueOf("0.234242534"), inlineQuery.getLocation().getLongitude());
} }
private void assertCallbackQuery(CallbackQuery callbackQuery) { private void assertCallbackQuery(CallbackQuery callbackQuery) {