diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2012-04-26 19:34:10 +0000 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2012-04-26 19:34:10 +0000 |
commit | 02c1fb78a8b1681325ec01f49ae6ff6603825243 (patch) | |
tree | a851415301ec88a03d492594ba47577f02dc0edd /test/org/traccar/protocol/Gl100ProtocolDecoderTest.java | |
parent | f0b1e58016632af5514d94b7439af77b9918b643 (diff) | |
download | trackermap-server-02c1fb78a8b1681325ec01f49ae6ff6603825243.tar.gz trackermap-server-02c1fb78a8b1681325ec01f49ae6ff6603825243.tar.bz2 trackermap-server-02c1fb78a8b1681325ec01f49ae6ff6603825243.zip |
Diffstat (limited to 'test/org/traccar/protocol/Gl100ProtocolDecoderTest.java')
-rw-r--r-- | test/org/traccar/protocol/Gl100ProtocolDecoderTest.java | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/Gl100ProtocolDecoderTest.java b/test/org/traccar/protocol/Gl100ProtocolDecoderTest.java new file mode 100644 index 000000000..1e1a1c978 --- /dev/null +++ b/test/org/traccar/protocol/Gl100ProtocolDecoderTest.java @@ -0,0 +1,38 @@ +package org.traccar.protocol; + +import static org.junit.Assert.assertNotNull; +import org.junit.Test; + +public class Gl100ProtocolDecoderTest { + + @Test + public void testDecode() throws Exception { + + Gl100ProtocolDecoder decoder = new Gl100ProtocolDecoder(new TestDataManager(), 0); + + assertNotNull(decoder.decode(null, null, + "+RESP:GTSOS,359231030000010,0,0,0,1,4.3,92,70.0,1,121.354335,31.222073,20090101000000,0460,0000,18d8,6141,00,11F0,0102120204")); + + assertNotNull(decoder.decode(null, null, + "+RESP:GTRTL,359231030000010,0,0,0,1,4.3,92,70.0,1,121.354335,31.222073,20090101000000,0460,0000,18d8,6141,00,11F0,0102120204")); + + assertNotNull(decoder.decode(null, null, + "+RESP:GTEST,359231030000010,0,0,0,1,4.3,92,70.0,1,121.354335,31.222073,20090101000000,0460,0000,18d8,6141,00,11F0,0102120204")); + + assertNotNull(decoder.decode(null, null, + "+RESP:GTSZI,359231030000010,0,3,0,1,4.3,92,70.0,1,121.354335,31.222073,20090101000000,0460,0000,18d8,6141,00,11F0,0102120204")); + + assertNotNull(decoder.decode(null, null, + "+RESP:GTLBC,359231030000010,02132523415,1,4.3,92,70.0,1,121.354335,31.222073,20090101000000,0460,0000,18d8,6141,00,11F0,0102120204")); + + assertNotNull(decoder.decode(null, null, + "+RESP:GTTRI,359231030000010,1,0,0,1,4.3,92,70.0,1,121.354335,31.222073,20090101000000,0460,0000,18d8,6141,00,11F0,0102120204")); + + assertNotNull(decoder.decode(null, null, + "+RESP:GTTRI,359231030000010,2,0,0,1,4.3,92,70.0,1,121.354335,31.222073,20090101000000,0460,0000,18d8,6141,00,0,0,1,-3.6,145,30.0,2,121.354442,31.221940,20090101000100,0460,0000,18d8,6141,00,11F0,0102120204")); + + //assertNotNull(decoder.decode(null, null, + // "AT+GTHBD=HeartBeat,359231030000010,20090101000000,11F0,0102120204")); + } + +} |