From 5c27874c07bd5f27142eef7dcc3abca47645cca6 Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Sat, 22 Jun 2024 13:13:41 +0200 Subject: [PATCH] actually not --- src/main/java/eu/m724/wtapi/object/Coordinates.java | 4 ---- src/test/java/eu/m724/wtapi/object/CoordinateTest.java | 9 ++++++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main/java/eu/m724/wtapi/object/Coordinates.java b/src/main/java/eu/m724/wtapi/object/Coordinates.java index 8e8479d..7960acd 100644 --- a/src/main/java/eu/m724/wtapi/object/Coordinates.java +++ b/src/main/java/eu/m724/wtapi/object/Coordinates.java @@ -18,8 +18,4 @@ public class Coordinates { this.city = city; return this; } - - public String getAddress() { - return city + ", " + country; - } } diff --git a/src/test/java/eu/m724/wtapi/object/CoordinateTest.java b/src/test/java/eu/m724/wtapi/object/CoordinateTest.java index 6ed05ae..4e2388a 100644 --- a/src/test/java/eu/m724/wtapi/object/CoordinateTest.java +++ b/src/test/java/eu/m724/wtapi/object/CoordinateTest.java @@ -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"); } }