aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-11-30 12:22:58 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2019-11-30 12:22:58 -0800
commit511520f9ac393735ec2c9fc5a18b2d4be8d071c5 (patch)
tree09a1b4ee25adf09eabc72112952cf3d361cb4291 /src/test/java/org/traccar
parent44f861b487d8f607d750d9f9c6b3e162b3f012b3 (diff)
downloadtrackermap-server-511520f9ac393735ec2c9fc5a18b2d4be8d071c5.tar.gz
trackermap-server-511520f9ac393735ec2c9fc5a18b2d4be8d071c5.tar.bz2
trackermap-server-511520f9ac393735ec2c9fc5a18b2d4be8d071c5.zip
Implement Omnicomm protocol
Diffstat (limited to 'src/test/java/org/traccar')
-rw-r--r--src/test/java/org/traccar/protocol/OmnicommFrameDecoderTest.java23
-rw-r--r--src/test/java/org/traccar/protocol/OmnicommProtocolDecoderTest.java23
2 files changed, 46 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/OmnicommFrameDecoderTest.java b/src/test/java/org/traccar/protocol/OmnicommFrameDecoderTest.java
new file mode 100644
index 000000000..a35677093
--- /dev/null
+++ b/src/test/java/org/traccar/protocol/OmnicommFrameDecoderTest.java
@@ -0,0 +1,23 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class OmnicommFrameDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ OmnicommFrameDecoder decoder = new OmnicommFrameDecoder();
+
+ verifyFrame(
+ binary("c080080061a61915340100001dec"),
+ decoder.decode(null, null, binary("c080080061a61915340100001dec")));
+
+ verifyFrame(
+ binary("C0866300CD1400002273231400580008011308A2E68DA10110002006280030003800400048005000600068007000142B08EC979EB60410EEB7CC8C02180020002804300038A2E68DA1012C33080010001800200028003000344308381000180220382800300244DF2A"),
+ decoder.decode(null, null, binary("C0866300CD1400002273231400580008011308A2E68DA10110002006280030003800400048005000600068007000142B08EC979EB60410EEB7CC8C02180020002804300038A2E68DA1012C33080010001800200028003000344308381000180220382800300244DF2A")));
+
+ }
+
+}
diff --git a/src/test/java/org/traccar/protocol/OmnicommProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/OmnicommProtocolDecoderTest.java
new file mode 100644
index 000000000..5219e125b
--- /dev/null
+++ b/src/test/java/org/traccar/protocol/OmnicommProtocolDecoderTest.java
@@ -0,0 +1,23 @@
+package org.traccar.protocol;
+
+import org.junit.Ignore;
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class OmnicommProtocolDecoderTest extends ProtocolTest {
+
+ //@Ignore
+ @Test
+ public void testDecode() throws Exception {
+
+ OmnicommProtocolDecoder decoder = new OmnicommProtocolDecoder(null);
+
+ verifyNull(decoder, binary(
+ "c080080061a61915340100001dec"));
+
+ verifyPositions(decoder, binary(
+ "C0866300CD1400002273231400580008011308A2E68DA10110002006280030003800400048005000600068007000142B08EC979EB60410EEB7CC8C02180020002804300038A2E68DA1012C33080010001800200028003000344308381000180220382800300244DF2A"));
+
+ }
+
+}