From 17ff0791718807be18e9f63aa095ed86d4b82b1c Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 18 Aug 2015 13:22:16 +1200 Subject: Re-factor server side classes --- test/org/traccar/DistanceHandlerTest.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/org/traccar/DistanceHandlerTest.java (limited to 'test') 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)); + + } + +} -- cgit v1.2.3