aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-05-12 22:17:40 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-05-12 22:17:40 -0700
commita09654ab3c4b540d1c4c768ad4c7ec7c1404332d (patch)
treeb0701b25ffad141f630da2db78f48b25f11a642e /src/test
parentb607711e6471cc6018c5bbb20a1df7c399bfb878 (diff)
downloadtrackermap-server-a09654ab3c4b540d1c4c768ad4c7ec7c1404332d.tar.gz
trackermap-server-a09654ab3c4b540d1c4c768ad4c7ec7c1404332d.tar.bz2
trackermap-server-a09654ab3c4b540d1c4c768ad4c7ec7c1404332d.zip
Support modular messages
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/traccar/protocol/CellocatorFrameDecoderTest.java19
-rw-r--r--src/test/java/org/traccar/protocol/CellocatorProtocolDecoderTest.java3
2 files changed, 22 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/CellocatorFrameDecoderTest.java b/src/test/java/org/traccar/protocol/CellocatorFrameDecoderTest.java
new file mode 100644
index 000000000..914166a58
--- /dev/null
+++ b/src/test/java/org/traccar/protocol/CellocatorFrameDecoderTest.java
@@ -0,0 +1,19 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class CellocatorFrameDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ CellocatorFrameDecoder decoder = new CellocatorFrameDecoder();
+
+ verifyFrame(
+ binary("4D4347500BA9880B00C80A7E003800000000000806000001210A14000613000000000D4457A5F71442AC02E80300000100040707000011171408060E1C08000100000200020000FD"),
+ decoder.decode(null, null, binary("4D4347500BA9880B00C80A7E003800000000000806000001210A14000613000000000D4457A5F71442AC02E80300000100040707000011171408060E1C08000100000200020000FD")));
+
+ }
+
+}
diff --git a/src/test/java/org/traccar/protocol/CellocatorProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/CellocatorProtocolDecoderTest.java
index 769760fa5..d3066aa2d 100644
--- a/src/test/java/org/traccar/protocol/CellocatorProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/CellocatorProtocolDecoderTest.java
@@ -11,6 +11,9 @@ public class CellocatorProtocolDecoderTest extends ProtocolTest {
CellocatorProtocolDecoder decoder = new CellocatorProtocolDecoder(null);
verifyPosition(decoder, binary(
+ "4D4347500BA9880B00880A3900EE00000000000806000001210A140002B6001E0034419B1B1900400401000000014004000000000240046000000003400480000000044004DA0A0000054004000000000640045E000000074004310000000840042B000000094004870000000B4004B10B00000C4004590000000D40040000000010400465000000114004780C000012400465650700144004A4000000154004207F000016400400000000174004000000001E4004000000001F40040000000020400400000000214004000000002440040000000006130003040211D67DA4F7883AAF028403000001000007070001250A1004090E1905001E0001000062"));
+
+ verifyPosition(decoder, binary(
"4d4350470041420f000402021226d8a70221d801010000000001000000000000000000000000c4d90000000ca7a741ff0096dd15a40700000000000000001619130c01e307e4"));
verifyPosition(decoder, binary(