aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/YwtProtocolDecoderTest.java
blob: 6e7edde97e11a369ef5578b9d26c40e86b231bc3 (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.ProtocolDecoderTest;

public class YwtProtocolDecoderTest extends ProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        YwtProtocolDecoder decoder = new YwtProtocolDecoder(new YwtProtocol());
        
        verifyNothing(decoder, text(
                "%SN,0417061042:0,0,140117041203,404"));

        verifyPosition(decoder, text(
                "%GP,3000012345:0,090723182813,E114.602345,N22.069725,,30,160,4,0,00,,2794-10FF-46000,3>0-0"));

        verifyPosition(decoder, text(
                "%RP,3000012345:0,090807182815,E114.602345,N22.069725,,30,160,4,0,00"));

        verifyPosition(decoder, text(
                "%KP,3000012345:0,090807183115,E114.602345,N22.069725,,30,160,5,0,00;"));

    }

}