diff options
author | Abyss777 <abyss@fox5.ru> | 2016-11-27 16:01:24 +0700 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2016-11-27 16:01:24 +0700 |
commit | f933147c0cba53df96448a64a2ba58dda4da1659 (patch) | |
tree | 4103302744f4ff1cfc5c3ff207aa68b516d7ee8c /test/org/traccar/geofence/GeofenceCircleTest.java | |
parent | 5ea4572553a84126b7e9f06c822e1a183413a558 (diff) | |
download | trackermap-server-f933147c0cba53df96448a64a2ba58dda4da1659.tar.gz trackermap-server-f933147c0cba53df96448a64a2ba58dda4da1659.tar.bz2 trackermap-server-f933147c0cba53df96448a64a2ba58dda4da1659.zip |
- Remove try-catch frome tests
- Fixed longitude normalizing for geofences near 180 longitude
- Added more tests
- Other fixes
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)); } } |