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

import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import org.junit.Test;
import org.traccar.ProtocolTest;

public class Xexun2FrameEncoderTest extends ProtocolTest {

    @Test
    public void testDecode() throws Exception {

        Xexun2FrameEncoder encoder = new Xexun2FrameEncoder();

        ByteBuf result = Unpooled.buffer();
        encoder.encode(null, binary("FAAF123456FAAF123456FBBF123456FAAF"), result);
        verifyFrame(binary("FAAF123456FBBF01123456FBBF02123456FAAF"), result);

    }

}