diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2012-12-19 22:15:09 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2012-12-19 22:15:09 +1300 |
commit | a506293e4196d480cca8149a7269f1e003ff8f7f (patch) | |
tree | 725afac7463aa02decaa96ddd15ec384c4d8fbad /test | |
parent | 58e829a30021e30d51e09fd085d16f6a701b6d98 (diff) | |
download | traccar-server-a506293e4196d480cca8149a7269f1e003ff8f7f.tar.gz traccar-server-a506293e4196d480cca8149a7269f1e003ff8f7f.tar.bz2 traccar-server-a506293e4196d480cca8149a7269f1e003ff8f7f.zip |
Added GT02 support (fix #96)
Diffstat (limited to 'test')
-rw-r--r-- | test/org/traccar/protocol/Gt02ProtocolDecoderTest.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/Gt02ProtocolDecoderTest.java b/test/org/traccar/protocol/Gt02ProtocolDecoderTest.java new file mode 100644 index 000000000..585a2cea3 --- /dev/null +++ b/test/org/traccar/protocol/Gt02ProtocolDecoderTest.java @@ -0,0 +1,19 @@ +package org.traccar.protocol; + +import org.jboss.netty.buffer.ChannelBuffers; +import static org.junit.Assert.assertNotNull; +import org.junit.Test; + +public class Gt02ProtocolDecoderTest { + + @Test + public void testDecode() throws Exception { + + Gt02ProtocolDecoder decoder = new Gt02ProtocolDecoder(new TestDataManager()); + + byte[] buf1 = {0x68,0x68,0x25,0x00,0x00,0x01,0x23,0x45,0x67,(byte)0x89,0x01,0x23,0x45,0x00,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x02,0x6B,0x3F,0x3E,0x02,0x6B,0x3F,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0D,0x0A}; + assertNotNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(buf1))); + + } + +} |