aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-08-18 05:42:43 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-08-18 05:42:43 +1200
commit4a14edeea2b98062d1d61fe5eee5e1dfaf664916 (patch)
tree74855163a092e3a3f7e7c54d05c5bdc6ed7f1827 /test/org/traccar/protocol
parenta1f7908769d296aed7766151340426e612883c6f (diff)
downloadtraccar-server-4a14edeea2b98062d1d61fe5eee5e1dfaf664916.tar.gz
traccar-server-4a14edeea2b98062d1d61fe5eee5e1dfaf664916.tar.bz2
traccar-server-4a14edeea2b98062d1d61fe5eee5e1dfaf664916.zip
Implement eSky ES610 protocol
Diffstat (limited to 'test/org/traccar/protocol')
-rw-r--r--test/org/traccar/protocol/EskyFrameDecoderTest.java24
-rw-r--r--test/org/traccar/protocol/EskyProtocolDecoderTest.java18
2 files changed, 42 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/EskyFrameDecoderTest.java b/test/org/traccar/protocol/EskyFrameDecoderTest.java
new file mode 100644
index 000000000..34a984bb2
--- /dev/null
+++ b/test/org/traccar/protocol/EskyFrameDecoderTest.java
@@ -0,0 +1,24 @@
+package org.traccar.protocol;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class EskyFrameDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ EskyFrameDecoder decoder = new EskyFrameDecoder();
+
+ verifyFrame(
+ binary("454f3b303b3836343930363032393139363632363b523b302b3137303830383135353335322b302e30303030302b302e30303030302b302e30302b302b3078312b302b302b302b31323333"),
+ decoder.decode(null, null, binary("454f3b303b3836343930363032393139363632363b523b302b3137303830383135353335322b302e30303030302b302e30303030302b302e30302b302b3078312b302b302b302b31323333")));
+
+ verifyFrame(
+ binary("454f3b303b3836343930363032393139363632363b523b302b3137303830383135353335322b302e30303030302b302e30303030302b302e30302b302b3078312b302b302b302b31323333"),
+ decoder.decode(null, null, binary("454f3b303b3836343930363032393139363632363b523b302b3137303830383135353335322b302e30303030302b302e30303030302b302e30302b302b3078312b302b302b302b31323333454f3b303b3836343930363032393139363632363b523b302b3137303830383135353335322b302e30303030302b302e30303030302b302e30302b302b3078312b302b302b302b31323333")));
+
+ }
+
+}
diff --git a/test/org/traccar/protocol/EskyProtocolDecoderTest.java b/test/org/traccar/protocol/EskyProtocolDecoderTest.java
new file mode 100644
index 000000000..52dff971f
--- /dev/null
+++ b/test/org/traccar/protocol/EskyProtocolDecoderTest.java
@@ -0,0 +1,18 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class EskyProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ EskyProtocolDecoder decoder = new EskyProtocolDecoder(new EskyProtocol());
+
+ verifyPosition(decoder, text(
+ "EO;0;864906029196626;R;0+170808155352+0.00000+0.00000+0.00+0+0x1+0+0+0+1233"));
+
+ }
+
+}