actually not

This commit is contained in:
Minecon724 2024-06-22 13:13:41 +02:00
parent c65eca9790
commit 5c27874c07
Signed by: Minecon724
GPG key ID: 3CCC4D267742C8E8
2 changed files with 8 additions and 5 deletions

View file

@ -18,8 +18,4 @@ public class Coordinates {
this.city = city;
return this;
}
public String getAddress() {
return city + ", " + country;
}
}

View file

@ -1,5 +1,7 @@
package eu.m724.wtapi.object;
import static org.junit.Assert.assertNull;
import org.junit.Test;
public class CoordinateTest {
@ -16,7 +18,12 @@ public class CoordinateTest {
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");
}
}