aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/L100ProtocolDecoderTest.java
blob: 47159debeb765c8d777c7614538f1f960401c835 (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.Test;
import org.traccar.ProtocolTest;

public class L100ProtocolDecoderTest extends ProtocolTest {

    @Test
    public void testDecode() throws Exception {

        L100ProtocolDecoder decoder = new L100ProtocolDecoder(new L100Protocol());

        verifyPosition(decoder, binary(
                "200141544c3836383030343032363939373235372c244750524d432c3039353534322c412c323833382e303130372c4e2c30373731332e333537392c452c302c39382c3031303631372c2c2c2a30332c2330313131313031313030303030302c302c302c302c302e30312c34352e39342c342e302c32352c3430342c342c38382c3361643541544c0234"));

        verifyPosition(decoder, binary(
                "200141544c3836313639333033353238353235332c244750524d432c3032323034302c412c323935342e303438312c4e2c30373335332e313639342c452c302c3135302c3238303431372c2c2c2a33362c2330313131313031313030303030302c302c302c302c38322e39322c33372e39322c342e302c32332c3430342c37302c3136332c6231373841544c0265"));

        verifyPosition(decoder, binary(
                "200141544c3335363839353033373533333734352c244750524d432c3131313731392e3030302c412c323833382e303034352c4e2c30373731332e333730372c452c302e30302c2c3132303831302c2c2c412a37352c2330313130303131313030313031302c4e2e432c4e2e432c4e2e432c31323334352e36372c33312e342c342e322c32312c3130302c3030302c3030303030312c303030303041544c027a"));

    }

}