diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2021-06-05 10:25:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-05 10:25:57 -0700 |
commit | 7ce5bb1f5491b85ea1e6ffd095c68b8d02bb831e (patch) | |
tree | 16a7b7158d401bed056e061e16607a36ded1e96a /src/test/java | |
parent | 5d317c47b953d9304b2874616a4146648062651a (diff) | |
parent | 1ede0fefed4fb220cd5510b5d75ddd92455f90fa (diff) | |
download | trackermap-server-7ce5bb1f5491b85ea1e6ffd095c68b8d02bb831e.tar.gz trackermap-server-7ce5bb1f5491b85ea1e6ffd095c68b8d02bb831e.tar.bz2 trackermap-server-7ce5bb1f5491b85ea1e6ffd095c68b8d02bb831e.zip |
Merge pull request #4657 from PinCarBR/vt200_ignition
Add ignition status to Vt200 Protocol
Diffstat (limited to 'src/test/java')
-rw-r--r-- | src/test/java/org/traccar/protocol/Vt200ProtocolDecoderTest.java | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/test/java/org/traccar/protocol/Vt200ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Vt200ProtocolDecoderTest.java index 423d4342c..791751c27 100644 --- a/src/test/java/org/traccar/protocol/Vt200ProtocolDecoderTest.java +++ b/src/test/java/org/traccar/protocol/Vt200ProtocolDecoderTest.java @@ -2,6 +2,7 @@ package org.traccar.protocol; import org.junit.Test; import org.traccar.ProtocolTest; +import org.traccar.model.Position; public class Vt200ProtocolDecoderTest extends ProtocolTest { @@ -43,7 +44,7 @@ public class Vt200ProtocolDecoderTest extends ProtocolTest { verifyPosition(decoder, binary( "28631037309456208200210103302307171805444417097301147188170198090f0000073a002000007e00074429")); - verifyNull(decoder, binary( + verifyPosition(decoder, binary( "286310373094563089001200032f2107171740144417075001147188872c29")); verifyAttributes(decoder, binary( @@ -55,6 +56,22 @@ public class Vt200ProtocolDecoderTest extends ProtocolTest { verifyPosition(decoder, binary( "28631037309456208400340102dc090617161654441577230114439597368c0a0c0000030500200100417c1baa349d3290510000006a00007000003d15004c11c629")); + verifyPosition(decoder, binary( + "2830140414000130890009010003280414090004df29"), + position("2014-04-28 09:00:04.000", false, 0.0, 0.0)); + + verifyPosition(decoder, binary( + "2830140414000130890012000003280414090004224388161134912397df29"), + position("2014-04-28 09:00:04.000", true, 22.73136, 113.81873166666666)); + + verifyAttribute(decoder, binary( + "2830140414000130890012000003280414090004224388161134912397df29"), + Position.KEY_IGNITION, false); + + verifyAttribute(decoder, binary( + "2830140414000130890012010003280414090004224388161134912397df29"), + Position.KEY_IGNITION, true); + } } |