aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/traccar/protocol/Dsf22FrameDecoderTest.java23
-rw-r--r--src/test/java/org/traccar/protocol/Dsf22ProtocolDecoderTest.java23
2 files changed, 46 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/Dsf22FrameDecoderTest.java b/src/test/java/org/traccar/protocol/Dsf22FrameDecoderTest.java
new file mode 100644
index 000000000..fc18b0560
--- /dev/null
+++ b/src/test/java/org/traccar/protocol/Dsf22FrameDecoderTest.java
@@ -0,0 +1,23 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class Dsf22FrameDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ var decoder = new Dsf22FrameDecoder();
+
+ verifyFrame(
+ binary("4642000101A8EE5F0ECA5FF421B33F524E32610401"),
+ decoder.decode(null, null, binary("4642000101A8EE5F0ECA5FF421B33F524E32610401")));
+
+ verifyFrame(
+ binary("4642000103A8EE5F0ECA5FF421B33F524E326104010216600EFC92F421B63F524E366104013238600E1EBEF421B93F524E35610401"),
+ decoder.decode(null, null, binary("4642000103A8EE5F0ECA5FF421B33F524E326104010216600EFC92F421B63F524E366104013238600E1EBEF421B93F524E35610401")));
+
+ }
+
+}
diff --git a/src/test/java/org/traccar/protocol/Dsf22ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Dsf22ProtocolDecoderTest.java
new file mode 100644
index 000000000..96cd78f03
--- /dev/null
+++ b/src/test/java/org/traccar/protocol/Dsf22ProtocolDecoderTest.java
@@ -0,0 +1,23 @@
+package org.traccar.protocol;
+
+import org.junit.Ignore;
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+@Ignore
+public class Dsf22ProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ var decoder = new Dsf22ProtocolDecoder(null);
+
+ verifyPositions(decoder, binary(
+ "4642000101A8EE5F0ECA5FF421B33F524E32610401"));
+
+ verifyPositions(decoder, binary(
+ "4642000103A8EE5F0ECA5FF421B33F524E326104010216600EFC92F421B63F524E366104013238600E1EBEF421B93F524E35610401"));
+
+ }
+
+}