aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/RitiProtocolDecoderTest.java
blob: a6b9c159ab6832fd59ea56920729ec785776bd90 (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 java.nio.ByteOrder;
import org.jboss.netty.buffer.ChannelBuffers;
import org.junit.Test;
import org.traccar.ProtocolDecoderTest;
import org.traccar.helper.ChannelBufferTools;

public class RitiProtocolDecoderTest extends ProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        RitiProtocolDecoder decoder = new RitiProtocolDecoder(new RitiProtocol());

        verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
                "3b28a2a2056315316d4000008100000000000000005f710000244750524d432c3138303535332e3030302c412c353532342e383437312c4e2c30313133342e313837382c452c302e30302c2c3032313231332c2c2c412a37340d0a00000000000000000000000000000000040404"));

        verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
                "3b2864a3056300006d40000003000000000000000000000000244750524d432c3231313734332e3030302c412c313335372e333637352c4e2c31303033362e363939322c452c302e30302c2c3031303931342c2c2c412a37380d0a00000000000000000000000000000000040404"));

    }

}