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

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

public class SnapperFrameDecoderTest extends ProtocolTest {

    @Test
    public void testDecode() throws Exception {

        var decoder = inject(new SnapperFrameDecoder());

        verifyFrame(
                binary("4b0341a6b0c608000040000005000000000000007d5e14010068656c6c6f"),
                decoder.decode(null, null, binary("4b0341a6b0c608000040000005000000000000007d5e14010068656c6c6f")));

        verifyFrame(
                binary("5012"),
                decoder.decode(null, null, binary("5012")));

    }

}