aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-08-18 13:22:16 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-08-18 13:22:16 +1200
commit17ff0791718807be18e9f63aa095ed86d4b82b1c (patch)
tree1e891f96c1b62e58f4de89def099def177af1b21 /test
parenta90ce59795690267a0924c2b911f14fe0340a6b4 (diff)
downloadtrackermap-server-17ff0791718807be18e9f63aa095ed86d4b82b1c.tar.gz
trackermap-server-17ff0791718807be18e9f63aa095ed86d4b82b1c.tar.bz2
trackermap-server-17ff0791718807be18e9f63aa095ed86d4b82b1c.zip
Re-factor server side classes
Diffstat (limited to 'test')
-rw-r--r--test/org/traccar/DistanceHandlerTest.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/org/traccar/DistanceHandlerTest.java b/test/org/traccar/DistanceHandlerTest.java
new file mode 100644
index 000000000..8afeb83f0
--- /dev/null
+++ b/test/org/traccar/DistanceHandlerTest.java
@@ -0,0 +1,22 @@
+package org.traccar;
+
+import org.junit.Test;
+import org.traccar.model.Event;
+import org.traccar.model.Position;
+
+import static org.junit.Assert.assertEquals;
+
+public class DistanceHandlerTest {
+
+ @Test
+ public void testCalculateDistance() throws Exception {
+
+ DistanceHandler distanceHandler = new DistanceHandler();
+
+ Position position = distanceHandler.calculateDistance(new Position());
+
+ assertEquals(0.0, position.getOther().get(Event.KEY_DISTANCE));
+
+ }
+
+}