aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-05-27 22:20:53 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-05-27 22:20:53 -0700
commite8ef6067bafeb051aac6272a457d269684c4b8f3 (patch)
treeac2dffb3f903708db8519a588212f8280b8ddffa /src/test/java/org
parentabf3fc0e3b440a15ad1cade05324fc6e13bfb25d (diff)
downloadtrackermap-server-e8ef6067bafeb051aac6272a457d269684c4b8f3.tar.gz
trackermap-server-e8ef6067bafeb051aac6272a457d269684c4b8f3.tar.bz2
trackermap-server-e8ef6067bafeb051aac6272a457d269684c4b8f3.zip
Implement ThinkPower protocol
Diffstat (limited to 'src/test/java/org')
-rw-r--r--src/test/java/org/traccar/protocol/ThinkPowerProtocolDecoderTest.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/ThinkPowerProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/ThinkPowerProtocolDecoderTest.java
new file mode 100644
index 000000000..ff808e667
--- /dev/null
+++ b/src/test/java/org/traccar/protocol/ThinkPowerProtocolDecoderTest.java
@@ -0,0 +1,27 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class ThinkPowerProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ var decoder = new ThinkPowerProtocolDecoder(null);
+
+ verifyNull(decoder, binary(
+ "0103002C01020F38363737333030353038323030343606544C3930344111522D312E302E31372E32303231303431300011C3"));
+
+ verifyPosition(decoder, binary(
+ "05300012016099E995010D743CC943EB481500000000EED4"));
+
+ verifyPosition(decoder, binary(
+ "05000007016099E768020162D8"));
+
+ verifyNull(decoder, binary(
+ "03040000C3DC"));
+
+ }
+
+}