aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/HaicomProtocolDecoderTest.java
blob: df1c33a061df34dfb3e07387feedb8c6d4ab7bac (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
26
27
package org.traccar.protocol;

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

public class HaicomProtocolDecoderTest extends ProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        HaicomProtocolDecoder decoder = new HaicomProtocolDecoder(new HaicomProtocol());

        verifyPosition(decoder, text(
                "$GPRS012497007097169,T100001,150618,230031,5402267400332464,0004,2014,000001,,,1,00#V040*"));

        verifyPosition(decoder, text(
                "$GPRS123456789012345,602S19A,100915,063515,7240649312041079,0019,3156,111000,10004,0000,11111,00LH#V037"));
        
        verifyPosition(decoder, text(
                "$GPRS123456789012345,T100001,141112,090751,7240649312041079,0002,1530,000001,,,1,00#V039*"));
        
        verifyPosition(decoder, text(
                "$GPRS012497007101250,T100001,141231,152235,7503733600305643,0000,2285,000001,,,1,00#V041*"));

    }

}