aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/OigoProtocolDecoderTest.java
blob: 14c34ae7c8242e52ea6e114f425a7cdf6debea60 (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
package org.traccar.protocol;

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

public class OigoProtocolDecoderTest extends ProtocolTest {

    @Test
    public void testDecode() throws Exception {

        OigoProtocolDecoder decoder = new OigoProtocolDecoder(new OigoProtocol());

        verifyPosition(decoder, binary(
                "7e004200000014631000258257000000ffff02d0690e000220690e0002200696dbd204bdfde31a070000b307101135de106e05f500000000010908010402200104ffff8001"));

        verifyPosition(decoder, binary(
                "7e004200000014631000258257000000ffff02d1690e00051f690e00051f0696dbd204bdfde31a070000b307100f35c0106305f500000000010908010402200104ffff8001"));

        verifyPosition(decoder, binary(
                "7e004200000014631000258257000000ffff0d82691300001669130000160696dbd804bdfdbb1a0800000007101035a2106905f500000000010908010402200104ffff8001"));

    }

}