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

import io.netty.handler.codec.http.HttpMethod;
import org.junit.Test;
import org.traccar.ProtocolTest;

public class OutsafeProtocolDecoderTest extends ProtocolTest {

    @Test
    public void testDecode() throws Exception {

        OutsafeProtocolDecoder decoder = new OutsafeProtocolDecoder(null);

        verifyPosition(decoder, request(HttpMethod.POST, "/",
                buffer("{\"device\":\"1e09d88a-fe8e-4dee-90b9-6297088ff3de\",\"owner\":\"\",\"data\":{\"cmd\":\"GEO\",\"ms1\":82,\"ms2\":80,\"ms3\":5266,\"ms4\":-68,\"observation\":\"$NMEA 323455\",\"content\":null},\"time\":null,\"origin\":\"TCP\",\"latitude\":19.334734,\"longitude\":-99.307236,\"altitude\":2000,\"heading\":0,\"rssi\":123}")));

    }

}