aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/traccar/protocol/NavisetProtocolDecoderTest.java
blob: c4b0ca73ace4930472ac6e0b3e8fb4ce5b445810 (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.ProtocolTest;

public class NavisetProtocolDecoderTest extends ProtocolTest {

    @Test
    public void testDecode() throws Exception {

        NavisetProtocolDecoder decoder = new NavisetProtocolDecoder(null);

        verifyNull(decoder, binary(
                "1310e4073836383230343030353935383436362a060716"));

        verifyPositions(decoder, binary(
                "b7501a203fab0d0bffcf4b5df0a82503a02cf6030000ff0c4200ba0007462a3a10000098280000f0f610fc4042ff00000000000000000000000000000000ff26000000000000808080808080808000000000ff000000000000000000000000000000000000000000000000000000000000ff00000000000000000000000000000000000000000000ff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008bff"));

        verifyPositions(decoder, binary(
                "b7501a203fda0d097fdc4b5d70aa2503c42cf6030000ff0fb40dea0006b12a3a100000b228000080f210044041ff00000000000000000000000000000000ff25000000000000808080808080808000000000ff1201000000000000000000000000000000000000000000001a0000000000ff00000000000000000000000000000000000000000000ff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b603"));

        verifyPositions(decoder, binary(
                "14501a2000a50c0955a64b5db8a92503fc2cf603000084ab"));

    }

}