aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/DistanceHandlerTest.java
blob: 853f2c6458c30320f7f5f105655b41ad570a7c82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package org.traccar;

import org.junit.Test;
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(Position.KEY_DISTANCE));

    }

}