aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/HuaShengFrameDecoderTest.java
blob: 56b8f210ce05fa52a9467798917a98d5d1dc8085 (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.Assert;
import org.junit.Test;
import org.traccar.ProtocolTest;

public class HuaShengFrameDecoderTest extends ProtocolTest {

    @Test
    public void testDecode() throws Exception {

        HuaShengFrameDecoder decoder = new HuaShengFrameDecoder();

        Assert.assertEquals(
                binary("c0010c00120060000000000004000600010100c0"),
                decoder.decode(null, null, binary("c0010c00120060000000000004000600010100c0")));

        Assert.assertEquals(
                binary("c0010c003e0002000000000010020012a0014f42445f3347315f56312e302e330013a0043335353835353035303434303635380006a08701000006a0a1035fc0"),
                decoder.decode(null, null, binary("c0010c003e0002000000000010020012a0014f42445f3347315f56312e302e330013a0043335353835353035303434303635380006a08701000006a0a1035fc0")));

    }

}