diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2013-08-23 01:19:09 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2013-08-23 01:19:09 +1200 |
commit | caa4fd747981075ed47315fffc5bbd18268278bd (patch) | |
tree | ea03028dce590667c5c289e1dc2962d6ca3dddea /test/org/traccar/protocol/OsmAndProtocolDecoderTest.java | |
parent | f94f4ea8f327a6d89cf3b484296bd4d97f2dde9f (diff) | |
download | trackermap-server-caa4fd747981075ed47315fffc5bbd18268278bd.tar.gz trackermap-server-caa4fd747981075ed47315fffc5bbd18268278bd.tar.bz2 trackermap-server-caa4fd747981075ed47315fffc5bbd18268278bd.zip |
Added OsmAnd protocol
Diffstat (limited to 'test/org/traccar/protocol/OsmAndProtocolDecoderTest.java')
-rw-r--r-- | test/org/traccar/protocol/OsmAndProtocolDecoderTest.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/OsmAndProtocolDecoderTest.java b/test/org/traccar/protocol/OsmAndProtocolDecoderTest.java new file mode 100644 index 000000000..9fb44b2ff --- /dev/null +++ b/test/org/traccar/protocol/OsmAndProtocolDecoderTest.java @@ -0,0 +1,25 @@ +package org.traccar.protocol; + +import org.jboss.netty.handler.codec.http.DefaultHttpRequest; +import org.jboss.netty.handler.codec.http.HttpMethod; +import org.jboss.netty.handler.codec.http.HttpVersion; +import static org.junit.Assert.assertNotNull; +import org.junit.Test; + +public class OsmAndProtocolDecoderTest { + + @Test + public void testDecode() throws Exception { + + OsmAndProtocolDecoder decoder = new OsmAndProtocolDecoder(null); + decoder.setDataManager(new TestDataManager()); + + assertNotNull(decoder.decode(null, null, new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, + "/?id=123456×tamp=1377177267&lat=60.0&lon=30.0&speed=0.0&bearing=0.0&altitude=0&hdop=0.0"))); + + assertNotNull(decoder.decode(null, null, new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, + "/?id=123456×tamp=1377177267&lat=60.0&lon=30.0"))); + + } + +} |