diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-08-18 13:22:16 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-08-18 13:22:16 +1200 |
commit | 17ff0791718807be18e9f63aa095ed86d4b82b1c (patch) | |
tree | 1e891f96c1b62e58f4de89def099def177af1b21 /test/org/traccar | |
parent | a90ce59795690267a0924c2b911f14fe0340a6b4 (diff) | |
download | trackermap-server-17ff0791718807be18e9f63aa095ed86d4b82b1c.tar.gz trackermap-server-17ff0791718807be18e9f63aa095ed86d4b82b1c.tar.bz2 trackermap-server-17ff0791718807be18e9f63aa095ed86d4b82b1c.zip |
Re-factor server side classes
Diffstat (limited to 'test/org/traccar')
-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)); + + } + +} |