aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/DistanceHandlerTest.java
blob: e58d9c772fc6013757d52a64e7da8dda9a017a97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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.getAttributes().get(Event.KEY_DISTANCE));

    }

}