aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/DistanceHandlerTest.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-02-23 15:33:33 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2019-02-23 15:33:33 -0800
commitb7d48127e60bcaa5d01f45d8df5203f28f9a1667 (patch)
treea5c6c85460775db357b39e8ac401db3c8d218dc6 /test/org/traccar/DistanceHandlerTest.java
parent563243a8da888244e910a4a7a10fb86ad525fdd4 (diff)
downloadtrackermap-server-b7d48127e60bcaa5d01f45d8df5203f28f9a1667.tar.gz
trackermap-server-b7d48127e60bcaa5d01f45d8df5203f28f9a1667.tar.bz2
trackermap-server-b7d48127e60bcaa5d01f45d8df5203f28f9a1667.zip
Refactor distance handler
Diffstat (limited to 'test/org/traccar/DistanceHandlerTest.java')
-rw-r--r--test/org/traccar/DistanceHandlerTest.java29
1 files changed, 0 insertions, 29 deletions
diff --git a/test/org/traccar/DistanceHandlerTest.java b/test/org/traccar/DistanceHandlerTest.java
deleted file mode 100644
index c97135074..000000000
--- a/test/org/traccar/DistanceHandlerTest.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package org.traccar;
-
-import org.junit.Test;
-import org.traccar.model.Position;
-
-import static org.junit.Assert.assertEquals;
-
-public class DistanceHandlerTest {
-
- @Test
- public void testCalculateDistance() throws Exception {
-
- DistanceHandler distanceHandler = new DistanceHandler(false, 0, 0);
-
- Position position = distanceHandler.handlePosition(new Position());
-
- assertEquals(0.0, position.getAttributes().get(Position.KEY_DISTANCE));
- assertEquals(0.0, position.getAttributes().get(Position.KEY_TOTAL_DISTANCE));
-
- position.set(Position.KEY_DISTANCE, 100);
-
- position = distanceHandler.handlePosition(position);
-
- assertEquals(100.0, position.getAttributes().get(Position.KEY_DISTANCE));
- assertEquals(100.0, position.getAttributes().get(Position.KEY_TOTAL_DISTANCE));
-
- }
-
-}