diff options
Diffstat (limited to 'test/org')
-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)); + + } + +} |