diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2022-01-15 23:20:48 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-15 23:20:48 -0800 |
commit | 4f30409c3bf1c2ea70823eb45bdf43bc5a4b6ad1 (patch) | |
tree | ecdad61979167b4fc605ba2ec4420709b5c1b0fd /src/test/java/org/traccar/protocol | |
parent | 839751e76e329adb573150644bd6198beba0d3b6 (diff) | |
parent | 0ce163ba62cc991fee56d9c05fca41c9f7a28143 (diff) | |
download | trackermap-server-4f30409c3bf1c2ea70823eb45bdf43bc5a4b6ad1.tar.gz trackermap-server-4f30409c3bf1c2ea70823eb45bdf43bc5a4b6ad1.tar.bz2 trackermap-server-4f30409c3bf1c2ea70823eb45bdf43bc5a4b6ad1.zip |
Merge pull request #4797 from traccar/polling
Implement polling protocol support
Diffstat (limited to 'src/test/java/org/traccar/protocol')
-rw-r--r-- | src/test/java/org/traccar/protocol/OrbcommProtocolDecoderTest.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/OrbcommProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/OrbcommProtocolDecoderTest.java new file mode 100644 index 000000000..fe84c1af4 --- /dev/null +++ b/src/test/java/org/traccar/protocol/OrbcommProtocolDecoderTest.java @@ -0,0 +1,18 @@ +package org.traccar.protocol; + +import org.junit.Test; +import org.traccar.ProtocolTest; + +public class OrbcommProtocolDecoderTest extends ProtocolTest { + + @Test + public void testDecode() throws Exception { + + var decoder = new OrbcommProtocolDecoder(null); + + verifyNull(decoder, response( + buffer("{\"ErrorID\":0,\"NextStartUTC\":\"2016-10-13 15:19:59\",\"Messages\":[{\"ID\":120213064,\"MessageUTC\":\"2016-10-12 12:42:01\",\"ReceiveUTC\":\"2016-10-12 12:42:01\",\"SIN\":0,\"MobileID\":\"01173096SKY0E45\",\"Payload\":{\"Name\":\"modemRegistration\",\"SIN\":0,\"MIN\":0,\"Fields\":[{\"Name\":\"hardwareMajorVersion\",\"Value\":\"4\"},{\"Name\":\"hardwareMinorVersion\",\"Value\":\"2\"},{\"Name\":\"softwareMajorVersion\",\"Value\":\"13\"},{\"Name\":\"softwareMinorVersion\",\"Value\":\"1\"},{\"Name\":\"product\",\"Value\":\"4\"},{\"Name\":\"wakeupPeriod\",\"Value\":\"None\"},{\"Name\":\"lastResetReason\",\"Value\":\"Software\"},{\"Name\":\"virtualCarrier\",\"Value\":\"6\"},{\"Name\":\"beam\",\"Value\":\"1\"},{\"Name\":\"vain\",\"Value\":\"0\"},{\"Name\":\"reserved\",\"Value\":\"0\"},{\"Name\":\"operatorTxState\",\"Value\":\"0\"},{\"Name\":\"userTxState\",\"Value\":\"0\"},{\"Name\":\"broadcastIDCount\",\"Value\":\"0\"}}],\"RegionName\":\"AMERRB11\",\"OTAMessageSize\":15,\"CustomerID\":0}]}"))); + + } + +} |