diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-08-18 13:48:54 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-08-18 13:48:54 +1200 |
commit | c06de84d316e7c67f6d22e12f855e2df34bbc3fb (patch) | |
tree | f7ab337c360bf50a79855787e9fa80e45ebd808c /test | |
parent | afaede42a0cc8170128219bd1dfa6277e4e1809a (diff) | |
parent | 3ad3edfadba59e94d95e967e9d5cd28ae671cae4 (diff) | |
download | trackermap-server-c06de84d316e7c67f6d22e12f855e2df34bbc3fb.tar.gz trackermap-server-c06de84d316e7c67f6d22e12f855e2df34bbc3fb.tar.bz2 trackermap-server-c06de84d316e7c67f6d22e12f855e2df34bbc3fb.zip |
Merge branch odometer
Diffstat (limited to 'test')
-rw-r--r-- | test/org/traccar/DistanceHandlerTest.java | 22 |
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)); + + } + +} |