aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/LdplProtocolDecoderTest.java
blob: bfe196b814ad480be450f59a5f3cda928bb00a41 (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.protocol;

import org.junit.Test;
import org.traccar.ProtocolTest;

public class LdplProtocolDecoderTest extends ProtocolTest {

    @Test
    public void testDecode() throws Exception {

        LdplProtocolDecoder decoder = new LdplProtocolDecoder(new LdplProtocol());
        
        verifyPosition(decoder, text(
                "*ID1,863071011086474,210314,153218,A,1831.4577,N,07351.1433,E,0.79,240.64,9,20,A,1,4.20,0,1,01,1,0,0,A01,R,935D#"),
                position("2014-03-21 15:32:18.000", true, 18.524295, 73.852388333333));

        verifyPosition(decoder, text(
                "*ID1,863071011086474,210314,162752,A,1831.4412,N,07351.0983,E,0.04,213.84,9,25,A,1,4.20,0,1,01,1,0,0,A01,L,EA01#"));

    }

}