aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/EskyProtocolDecoderTest.java
blob: 2ff58fc33d648c8bef0146573c7f964f1d34d9a3 (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 EskyProtocolDecoderTest extends ProtocolTest {

    @Test
    public void testDecode() throws Exception {

        EskyProtocolDecoder decoder = new EskyProtocolDecoder(new EskyProtocol());

        verifyNull(decoder, text(
                "EL;1;864906029196626;170822143426;"));

        verifyPosition(decoder, text(
                "EO;0;864906029196626;R;7+170822143646+-26.10806+27.94600+0.40+0+0x1+0+102540+0+1242"));

        verifyPosition(decoder, text(
                "EO;0;864906029196626;R;0+170808155352+0.00000+0.00000+0.00+0+0x1+0+0+0+1233"));

        verifyNull(decoder, text(
                "ET;1;014682000989425;R;0+171216001250+33.34405+-111.96682+0.00+0+0x1+0+25598+0+1257+0"));

    }

}