aboutsummaryrefslogtreecommitdiff
path: root/test/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-11-01 19:46:59 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-11-01 19:46:59 +1300
commit82d01c84b4c3d9cb3a3b78371b6a45025276e9e9 (patch)
treea57658ecbe7e4b8c2e91cef0f955b0ed87602879 /test/org
parentbf57bcad19ff56a6c96b1436356fc30beabd3eeb (diff)
downloadtrackermap-server-82d01c84b4c3d9cb3a3b78371b6a45025276e9e9.tar.gz
trackermap-server-82d01c84b4c3d9cb3a3b78371b6a45025276e9e9.tar.bz2
trackermap-server-82d01c84b4c3d9cb3a3b78371b6a45025276e9e9.zip
Clean up T800X protocol decoder
Diffstat (limited to 'test/org')
-rw-r--r--test/org/traccar/protocol/T800xProtocolDecoderTest.java34
1 files changed, 18 insertions, 16 deletions
diff --git a/test/org/traccar/protocol/T800xProtocolDecoderTest.java b/test/org/traccar/protocol/T800xProtocolDecoderTest.java
index 7bb149ae6..56efa5a92 100644
--- a/test/org/traccar/protocol/T800xProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/T800xProtocolDecoderTest.java
@@ -1,28 +1,30 @@
package org.traccar.protocol;
-import junit.framework.TestCase;
-import org.jboss.netty.buffer.ChannelBuffers;
import org.junit.Test;
-import org.traccar.helper.ChannelBufferTools;
+import org.traccar.ProtocolDecoderTest;
-public class T800xProtocolDecoderTest extends TestCase {
+public class T800xProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- /*T800xProtocolDecoder decoder = new T800xProtocolDecoder(new TestDataManager(), null, null);
+ T800xProtocolDecoder decoder = new T800xProtocolDecoder(new T800xProtocol());
- assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
- "232301001500020357367031063979150208625010"))));
+ verifyNothing(decoder, binary(
+ "232301001500020357367031063979150208625010"));
- assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
- "6767030004001A0001"))));*/
+ verifyNothing(decoder, binary(
+ "232303000f00000357367031063979"));
+
+ verifyPosition(decoder, binary(
+ "232304004200030357367031063979003c03842307d00000c80000050100008000008900890100000017b100151022121648b8ef0c4422969342cec5944100000110"));
+
+ verifyPosition(decoder, binary(
+ "232302004200150357367031063979003c03842307d000004a0000050100004001009500940000000285ab001510281350477f710d4452819342d1ba944101160038"));
+
+ verifyAttributes(decoder, binary(
+ "232302004200000357367031063979003c03842307d000008000000501000000010094009400000002a0b90015102814590694015a00620cf698620cf49e620cf498"));
- /* assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
- "6767070088001050E2281400FFFFFFFF02334455660333445566043344556605AA00000007334455660A334455660B334455660C4E2000000DAA0000000E334455660F3344556610AAAA000011334455661C334455661F334455662133445566423344556646334455664D334455665C334455665E33445566880000000089000000008A000000008B00000000"))));
-*/
- /* verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
- "676702001b03c5538086df0190c1790b3482df0f0157020800013beb00342401"))));
-*/
}
-} \ No newline at end of file
+
+}