diff options
Diffstat (limited to 'test/org/traccar/geofence/GeofenceCircleTest.java')
-rw-r--r-- | test/org/traccar/geofence/GeofenceCircleTest.java | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/test/org/traccar/geofence/GeofenceCircleTest.java b/test/org/traccar/geofence/GeofenceCircleTest.java index 52c214b53..133ca1db8 100644 --- a/test/org/traccar/geofence/GeofenceCircleTest.java +++ b/test/org/traccar/geofence/GeofenceCircleTest.java @@ -8,29 +8,19 @@ import org.junit.Test; public class GeofenceCircleTest { @Test - public void testCircleWKT() { + public void testCircleWkt() throws ParseException { String test = "CIRCLE (55.75414 37.6204, 100)"; GeofenceGeometry geofenceGeometry = new GeofenceCircle(); - try { geofenceGeometry.fromWkt(test); - } catch (ParseException e){ - Assert.assertTrue("ParseExceprion: " + e.getMessage(), true); - } Assert.assertEquals(geofenceGeometry.toWkt(), test); } @Test - public void testContainsCircle() { + public void testContainsCircle() throws ParseException { String test = "CIRCLE (55.75414 37.6204, 100)"; GeofenceGeometry geofenceGeometry = new GeofenceCircle(); - try { geofenceGeometry.fromWkt(test); - } catch (ParseException e){ - Assert.assertTrue("ParseExceprion: " + e.getMessage(), true); - } - Assert.assertTrue(geofenceGeometry.containsPoint(55.75477, 37.62025)); - Assert.assertTrue(!geofenceGeometry.containsPoint(55.75545, 37.61921)); } } |