diff options
author | Jan-Piet Mens <jpmens@gmail.com> | 2017-06-13 12:30:49 +0200 |
---|---|---|
committer | Jan-Piet Mens <jpmens@gmail.com> | 2017-06-14 07:57:40 +0200 |
commit | 7f62f1671b38b9ffbeff66aa4ee79e0f875b1c66 (patch) | |
tree | b9e3bbc21546a8441c7d0162d775126e9102ccad /test/org/traccar | |
parent | b84d627b57181907c73d2c4ebb46ed011be8cfab (diff) | |
download | trackermap-server-7f62f1671b38b9ffbeff66aa4ee79e0f875b1c66.tar.gz trackermap-server-7f62f1671b38b9ffbeff66aa4ee79e0f875b1c66.tar.bz2 trackermap-server-7f62f1671b38b9ffbeff66aa4ee79e0f875b1c66.zip |
New protocol decoder for OwnTracks
- removed comments and try/catch as per request
- add existence checks
Diffstat (limited to 'test/org/traccar')
-rw-r--r-- | test/org/traccar/protocol/OwnTracksProtocolDecoderTest.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/OwnTracksProtocolDecoderTest.java b/test/org/traccar/protocol/OwnTracksProtocolDecoderTest.java new file mode 100644 index 000000000..c11670cae --- /dev/null +++ b/test/org/traccar/protocol/OwnTracksProtocolDecoderTest.java @@ -0,0 +1,26 @@ +package org.traccar.protocol; + +import org.junit.Test; +import org.traccar.ProtocolTest; + +public class OwnTracksProtocolDecoderTest extends ProtocolTest { + + @Test + public void testDecode() throws Exception { + + OwnTracksProtocolDecoder decoder = new OwnTracksProtocolDecoder(new OwnTracksProtocol()); + +/* + * I don'w know how to get JSON into that ... + * + verifyNull(decoder, request( + "{ \"id\" : \"hello\" }")); + + verifyPosition(decoder, request( + "{\"cog\":271,\"lon\":2.29513,\"acc\":5,\"vel\":61,\"vac\":21,\"lat\":48.85833,\"tst\":1497349316,\"alt\":167,\"_type\":\"location\",\"tid\":\"JJ\"}")); + +*/ + + } + +} |