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;
|
this.city = city;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAddress() {
|
|
||||||
return city + ", " + country;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package eu.m724.wtapi.object;
|
package eu.m724.wtapi.object;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertNull;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
public class CoordinateTest {
|
public class CoordinateTest {
|
||||||
|
@ -16,7 +18,12 @@ public class CoordinateTest {
|
||||||
System.out.printf("Precision loss expected: %f\n", coordinates.longitude);
|
System.out.printf("Precision loss expected: %f\n", coordinates.longitude);
|
||||||
assert coordinates.longitude != -179.9; // TODO fix precision loss
|
assert coordinates.longitude != -179.9; // TODO fix precision loss
|
||||||
|
|
||||||
|
assertNull(coordinates.city);
|
||||||
|
assertNull(coordinates.country);
|
||||||
|
|
||||||
coordinates.setAddress("SQ", "San Escobar");
|
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