actually not
This commit is contained in:
parent
c65eca9790
commit
5c27874c07
2 changed files with 8 additions and 5 deletions
|
@ -18,8 +18,4 @@ public class Coordinates {
|
|||
this.city = city;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return city + ", " + country;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package eu.m724.wtapi.object;
|
||||
|
||||
import static org.junit.Assert.assertNull;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class CoordinateTest {
|
||||
|
@ -15,8 +17,13 @@ public class CoordinateTest {
|
|||
coordinates = new Coordinates(-91.1, 180.1);
|
||||
System.out.printf("Precision loss expected: %f\n", coordinates.longitude);
|
||||
assert coordinates.longitude != -179.9; // TODO fix precision loss
|
||||
|
||||
assertNull(coordinates.city);
|
||||
assertNull(coordinates.country);
|
||||
|
||||
coordinates.setAddress("SQ", "San Escobar");
|
||||
assert coordinates.getAddress().equals("San Escobar, SQ");
|
||||
|
||||
assert coordinates.city.equals("San Escobar");
|
||||
assert coordinates.country.equals("SQ");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue