aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/traccar/protocol
diff options
context:
space:
mode:
authorOliver Schramm <oliver.schramm97@gmail.com>2021-05-27 15:28:16 +0200
committerOliver Schramm <oliver.schramm97@gmail.com>2021-05-27 15:28:16 +0200
commitcac617f6518ed5ad048cc9c57b80849c34650afa (patch)
tree16a8ca122d7a226f876ec5fa9d01dfce7a75bf71 /src/test/java/org/traccar/protocol
parent4581380113a7edf67936a0d567fc469de709e508 (diff)
downloadtraccar-server-cac617f6518ed5ad048cc9c57b80849c34650afa.tar.gz
traccar-server-cac617f6518ed5ad048cc9c57b80849c34650afa.tar.bz2
traccar-server-cac617f6518ed5ad048cc9c57b80849c34650afa.zip
Add unit test for alarm event decoding
Diffstat (limited to 'src/test/java/org/traccar/protocol')
-rw-r--r--src/test/java/org/traccar/protocol/MegastekProtocolDecoderTest.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/MegastekProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/MegastekProtocolDecoderTest.java
index d2201a4a9..3747d9200 100644
--- a/src/test/java/org/traccar/protocol/MegastekProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/MegastekProtocolDecoderTest.java
@@ -29,6 +29,10 @@ public class MegastekProtocolDecoderTest extends ProtocolTest {
verifyNull(decoder, text(
"0140$MGV002,354550056642321,GVT900-3,S,300917,071731,V,,,,,00,00,00,99.9,0.000,0.00,,0.0,457,01,0741,00CD,,0000,0000,20,10,0, , ,,1-1,94,PW ON;!"));
+ verifyAttribute(decoder, text(
+ "$MGV002,869152024446923,,S,290816,200627,V,5056.21059,N,00439.25034,E,00,00,00,99.9,,,-25.1,,206,01,0BBB,4418,28,,,,,,,,,01,093,PW ON;"),
+ Position.KEY_ALARM, Position.ALARM_POWER_ON);
+
verifyPosition(decoder, text(
"$MGV002,869152024446923,,S,290816,200627,V,5056.21059,N,00439.25034,E,00,00,00,99.9,,,-25.1,,206,01,0BBB,4418,28,,,,,,,,,01,093,Timer;"));