aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-01-05 18:28:29 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2019-01-05 18:28:29 -0800
commitacaf8a43c33ec97e4553b806a486fd79c93a316d (patch)
tree51e7e8b1e8ec10cefeea7d61ddb3900ef395eca1 /test/org/traccar
parenta0bf6407c3e8b8a4dc3648d70dbdac0bd99cb852 (diff)
downloadtrackermap-server-acaf8a43c33ec97e4553b806a486fd79c93a316d.tar.gz
trackermap-server-acaf8a43c33ec97e4553b806a486fd79c93a316d.tar.bz2
trackermap-server-acaf8a43c33ec97e4553b806a486fd79c93a316d.zip
Support Nyitech NT-183W protocol
Diffstat (limited to 'test/org/traccar')
-rw-r--r--test/org/traccar/protocol/NyitechProtocolDecoderTest.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/NyitechProtocolDecoderTest.java b/test/org/traccar/protocol/NyitechProtocolDecoderTest.java
new file mode 100644
index 000000000..4cafd7612
--- /dev/null
+++ b/test/org/traccar/protocol/NyitechProtocolDecoderTest.java
@@ -0,0 +1,30 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class NyitechProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ NyitechProtocolDecoder decoder = new NyitechProtocolDecoder(null);
+
+ verifyPosition(decoder, binary(
+ "4040690030313436383230303238373201201c0c12031a308080801c0c12031a3007d67e7e08aceb841002000000ae08000000000000000000000000001e002900f0ffdd002700f2ffe0002700f2ffe1002400f0ffdf002400f3ffe3008a00ffff01010000a9c70d0a"));
+
+ verifyPosition(decoder, binary(
+ "4040390030313436383230303238373203200100010c000000001c0c1203192a1b0c12171d3104fed87d089288801000000000000011ec0d0a"));
+
+ verifyPosition(decoder, binary(
+ "4040480030313436383230303238373201101c0c12031a2907fa7e7e08b8eb841002000000bc080101040904040300010100000a818283848586878862611c0c12031a293f9c0d0a"));
+
+ verifyPosition(decoder, binary(
+ "40404b003247512d313630313030313901101e0b100604190c02c83707f887ac0f000000002d130101030304020000010100000d426162636465666768696a6ba51e0b1006041965c30d0a"));
+
+ verifyPosition(decoder, binary(
+ "4040490030313436383230303238373202201c0c120319348080001b0c12171d3104fed87d0892888010000000000000000000000000000000000000008b00ffff010100008a480d0a"));
+
+ }
+
+}