aboutsummaryrefslogtreecommitdiff
path: root/test/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2012-12-07 17:52:58 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2012-12-07 17:52:58 +1300
commit9cfee9cc32c5074dba6e8bd888db196bcbb91b87 (patch)
treedb7780d417e8e8baf0f89bbfb763ae060364fde8 /test/org
parentb444e789127951b902d557517a520d44c59f15d2 (diff)
downloadtrackermap-server-9cfee9cc32c5074dba6e8bd888db196bcbb91b87.tar.gz
trackermap-server-9cfee9cc32c5074dba6e8bd888db196bcbb91b87.tar.bz2
trackermap-server-9cfee9cc32c5074dba6e8bd888db196bcbb91b87.zip
Fixed meiligao parser (fix #104)
Diffstat (limited to 'test/org')
-rw-r--r--test/org/traccar/protocol/MeiligaoProtocolDecoderTest.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/org/traccar/protocol/MeiligaoProtocolDecoderTest.java b/test/org/traccar/protocol/MeiligaoProtocolDecoderTest.java
index d1cd5ff8b..06feff07d 100644
--- a/test/org/traccar/protocol/MeiligaoProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/MeiligaoProtocolDecoderTest.java
@@ -13,7 +13,7 @@ public class MeiligaoProtocolDecoderTest {
MeiligaoProtocolDecoder decoder = new MeiligaoProtocolDecoder(new TestDataManager());
ChannelBufferFactory factory = new HeapChannelBufferFactory();
-
+
byte[] buf1 = {0x12,0x34,0x56,(byte)0xFF,(byte)0xFF,(byte)0xFF,(byte)0xFF,0x50,0x00,(byte)0x8B,(byte)0x9B,0x0D,0x0A};
assertNull(decoder.decode(null, null, factory.getBuffer(buf1, 0, buf1.length)));
@@ -26,6 +26,9 @@ public class MeiligaoProtocolDecoderTest {
byte[] buf4 = {0x16,(byte)0x91,0x00,0x04,(byte)0x84,0x12,0x4F,(byte)0x99,0x55,0x31,0x34,0x30,0x36,0x30,0x33,0x2E,0x30,0x30,0x30,0x2C,0x41,0x2C,0x30,0x39,0x33,0x34,0x2E,0x32,0x35,0x35,0x34,0x2C,0x4E,0x2C,0x30,0x36,0x39,0x31,0x33,0x2E,0x30,0x39,0x36,0x36,0x2C,0x57,0x2C,0x30,0x2E,0x30,0x30,0x2C,0x2C,0x33,0x30,0x31,0x30,0x31,0x32,0x2C,0x2C,0x2A,0x30,0x32,0x7C,0x30,0x2E,0x38,0x7C,0x32,0x30,0x37,0x7C,0x30,0x30,0x30,0x30,(byte)0xFA,0x42,0x0D,0x0A};
assertNotNull(decoder.decode(null, null, factory.getBuffer(buf4, 0, buf4.length)));
+ byte[] buf5 = {0x45,0x12,0x42,0x20,0x30,0x6F,(byte)0xFF,(byte)0x99,(byte)0x99,0x14,0x31,0x35,0x35,0x34,0x32,0x32,0x2E,0x30,0x30,0x30,0x2C,0x56,0x2C,0x32,0x32,0x33,0x30,0x2E,0x37,0x36,0x32,0x33,0x2C,0x4E,0x2C,0x31,0x31,0x34,0x30,0x33,0x2E,0x34,0x32,0x31,0x38,0x2C,0x45,0x2C,0x30,0x2E,0x30,0x30,0x2C,0x30,0x2C,0x30,0x36,0x30,0x32,0x31,0x31,0x2C,0x2C,0x2A,0x31,0x41,0x7C,0x30,0x2E,0x30,0x7C,0x32,0x36,0x7C,0x30,0x30,0x30,0x30,0x7C,0x30,0x30,0x30,0x30,0x2C,0x30,0x30,0x30,0x30,0x7C,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x7C,0x36,0x33,0x7C,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,(byte)0xBA,(byte)0xC1,0x0D,0x0A};
+ assertNotNull(decoder.decode(null, null, factory.getBuffer(buf5, 0, buf5.length)));
+
}
}