aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-09-24 11:16:42 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-09-24 11:16:42 +1200
commit38358bad4ea11a3fa6f581042fe5978f14f32d26 (patch)
treed8704572c31c86cee2d1a3e53ae527d3142ee35e /test
parent8f9ecb8683ea6f12308c302541afcd49a58c3dbc (diff)
downloadtraccar-server-38358bad4ea11a3fa6f581042fe5978f14f32d26.tar.gz
traccar-server-38358bad4ea11a3fa6f581042fe5978f14f32d26.tar.bz2
traccar-server-38358bad4ea11a3fa6f581042fe5978f14f32d26.zip
Add new Tytan unit test cases
Diffstat (limited to 'test')
-rw-r--r--test/org/traccar/protocol/TytanProtocolDecoderTest.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/test/org/traccar/protocol/TytanProtocolDecoderTest.java b/test/org/traccar/protocol/TytanProtocolDecoderTest.java
index fb389a2cd..3777ad4c4 100644
--- a/test/org/traccar/protocol/TytanProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/TytanProtocolDecoderTest.java
@@ -1,6 +1,10 @@
package org.traccar.protocol;
+import org.jboss.netty.buffer.ChannelBuffers;
import org.junit.Test;
+import org.traccar.helper.ChannelBufferTools;
+
+import static org.traccar.helper.DecoderVerifier.verify;
public class TytanProtocolDecoderTest extends ProtocolDecoderTest {
@@ -8,9 +12,12 @@ public class TytanProtocolDecoderTest extends ProtocolDecoderTest {
public void testDecode() throws Exception {
TytanProtocolDecoder decoder = new TytanProtocolDecoder(new TytanProtocol());
-
- /*verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
- "d5300000689d65556877fbd437a09d8ea89360005a23124e410201213704000907000009ffffffffffffffff0affffffffffffffff18ff63ff7f7fff65ff66ff67ff68ff69ff6b00ff6cffffffff6dff7fffffffff81ffffffff82ffff83ffffffffffffffff88ffff9600"))));*/
+
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "b50028080000689d215602772f00378f1b8e9fdd98005a042efb3e4102030000000402140c070200000901"))));
+
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "b500280a0000689d215602772f00378f1b8e9fdd98005a042efb3e4102030000000402140c07020000da20"))));
}