diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2021-01-06 22:45:48 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2021-01-06 22:45:48 -0800 |
commit | d21747209c9092e3cd693a872d38b9fac8fb1abc (patch) | |
tree | 120dfc817e6efdf5b7a15389f8eb11135e0d5f8a /src/test/java/org/traccar/protocol | |
parent | a9745c6b14a0b6f48e57b9055c0977d814b46e28 (diff) | |
download | trackermap-server-d21747209c9092e3cd693a872d38b9fac8fb1abc.tar.gz trackermap-server-d21747209c9092e3cd693a872d38b9fac8fb1abc.tar.bz2 trackermap-server-d21747209c9092e3cd693a872d38b9fac8fb1abc.zip |
Satellite protocol support
Diffstat (limited to 'src/test/java/org/traccar/protocol')
-rw-r--r-- | src/test/java/org/traccar/protocol/AdmFrameDecoderTest.java | 27 | ||||
-rw-r--r-- | src/test/java/org/traccar/protocol/AdmProtocolDecoderTest.java | 3 |
2 files changed, 30 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/AdmFrameDecoderTest.java b/src/test/java/org/traccar/protocol/AdmFrameDecoderTest.java new file mode 100644 index 000000000..e7297cdbd --- /dev/null +++ b/src/test/java/org/traccar/protocol/AdmFrameDecoderTest.java @@ -0,0 +1,27 @@ +package org.traccar.protocol; + +import org.junit.Test; +import org.traccar.ProtocolTest; + +public class AdmFrameDecoderTest extends ProtocolTest { + + @Test + public void testDecode() throws Exception { + + AdmFrameDecoder decoder = new AdmFrameDecoder(); + + verifyFrame( + binary("38363931353330343235323337383400003728e000001402441d5f42c3711642930d000000c7000a461954f25fd82ed508000000000000000044000000010000000000140000"), + decoder.decode(null, null, binary("38363931353330343235323337383400003728e000001402441d5f42c3711642930d000000c7000a461954f25fd82ed508000000000000000044000000010000000000140000"))); + + verifyFrame( + binary("000042033836393135333034323532333738340000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000078"), + decoder.decode(null, null, binary("000042033836393135333034323532333738340000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000078"))); + + verifyFrame( + binary("010022003300072020000000000000000044062A330000000000107F10565D4A8310"), + decoder.decode(null, null, binary("010022003300072020000000000000000044062A330000000000107F10565D4A8310"))); + + } + +} diff --git a/src/test/java/org/traccar/protocol/AdmProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/AdmProtocolDecoderTest.java index 51e1e2bab..bf8a81dc1 100644 --- a/src/test/java/org/traccar/protocol/AdmProtocolDecoderTest.java +++ b/src/test/java/org/traccar/protocol/AdmProtocolDecoderTest.java @@ -10,6 +10,9 @@ public class AdmProtocolDecoderTest extends ProtocolTest { AdmProtocolDecoder decoder = new AdmProtocolDecoder(null); + verifyPosition(decoder, binary( + "38363931353330343235323337383400003728e000001402441d5f42c3711642930d000000c7000a461954f25fd82ed508000000000000000044000000010000000000140000")); + verifyNull(decoder, binary( "000042033836393135333034323532333738340000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000078")); |