diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-01-21 13:30:01 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-01-21 13:30:01 +1300 |
commit | d2cc0c9370fd9713e674f0f8622d35296f041d17 (patch) | |
tree | 29cc3234f3a6e6826b004f713278e3c74ee2f26e /test/org | |
parent | ddc9dbefd717b1b037a4397e55dae34bf13598c0 (diff) | |
download | trackermap-server-d2cc0c9370fd9713e674f0f8622d35296f041d17.tar.gz trackermap-server-d2cc0c9370fd9713e674f0f8622d35296f041d17.tar.bz2 trackermap-server-d2cc0c9370fd9713e674f0f8622d35296f041d17.zip |
Begin AutoFon protocol implementation
Diffstat (limited to 'test/org')
-rw-r--r-- | test/org/traccar/protocol/AutoFonProtocolDecoderTest.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/AutoFonProtocolDecoderTest.java b/test/org/traccar/protocol/AutoFonProtocolDecoderTest.java new file mode 100644 index 000000000..13b58c464 --- /dev/null +++ b/test/org/traccar/protocol/AutoFonProtocolDecoderTest.java @@ -0,0 +1,29 @@ +package org.traccar.protocol;
+
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.junit.Test;
+import org.traccar.helper.ChannelBufferTools;
+import org.traccar.helper.TestDataManager;
+
+import static org.junit.Assert.assertNull;
+import static org.traccar.helper.DecoderVerifier.verify;
+
+public class AutoFonProtocolDecoderTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ AutoFonProtocolDecoder decoder = new AutoFonProtocolDecoder(new TestDataManager(), null, null);
+
+ assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "10556103592310314825728F"))));
+
+ //verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ // "111E00000000000000000100007101010B0C020302010B0C0005A053FFFFFFFF02010B0C00276047FFFFFFFF1F5600FA000176F218C7850C0B0B0C203A033DBD46035783EF009E00320014FFFF45"))));
+
+ //verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ // "12060000007501010B0C00089CFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000003E7FFFF02007601010B0C00269CFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000003E7FFFF4A007601010B0C01089CFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000003E7FFFF04007501010B0C01269CFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000003E7FFFF80007601010B0C02089CFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000003E7FFFFA6007501010B0C02231F5600FA000176F218C70000000000000000000000000000000000000003E7FFFF9629"))));
+
+ }
+
+}
|