aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/Tr20ProtocolDecoderTest.java
blob: 11d7847c2d4eddc084f2db3298b98d8c78e8b5a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package org.traccar.protocol;

import org.junit.Test;
import org.traccar.ProtocolDecoderTest;

public class Tr20ProtocolDecoderTest extends ProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        Tr20ProtocolDecoder decoder = new Tr20ProtocolDecoder(new Tr20Protocol());

        verifyNothing(decoder, text(
                "%%TRACKPRO01,1"));

        verifyPosition(decoder, text(
                "%%TR-10,A,050916070549,N2240.8887E11359.2994,0,000,NA,D3800000,150,CFG:resend|"),
                position("2005-09-16 07:05:49.000", true, 22.68148, 113.98832));

        verifyPosition(decoder, text(
                "%%TR-10,A,050916070549,N2240.8887E11359.2994,0,000,NA,D3800000,150,CFG:resend|"));

    }

}