aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-09-05 11:18:58 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-09-05 11:18:58 +1200
commit380bdd08e8fbe35b3f197b13363e0d6c17996c8a (patch)
treeee6ed12efed8e822942e320e997b256cc61cc942
parent15bccd650ea2236ba2ca7296a9c76bfb51208d5a (diff)
downloadtrackermap-server-380bdd08e8fbe35b3f197b13363e0d6c17996c8a.tar.gz
trackermap-server-380bdd08e8fbe35b3f197b13363e0d6c17996c8a.tar.bz2
trackermap-server-380bdd08e8fbe35b3f197b13363e0d6c17996c8a.zip
Add Tramigo unit test
-rw-r--r--test/org/traccar/protocol/TramigoProtocolDecoderTest.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/org/traccar/protocol/TramigoProtocolDecoderTest.java b/test/org/traccar/protocol/TramigoProtocolDecoderTest.java
index 434d3815f..9c8a4848c 100644
--- a/test/org/traccar/protocol/TramigoProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/TramigoProtocolDecoderTest.java
@@ -1,13 +1,9 @@
package org.traccar.protocol;
+import java.nio.ByteOrder;
import org.jboss.netty.buffer.ChannelBuffers;
import org.junit.Test;
import org.traccar.helper.ChannelBufferTools;
-import org.traccar.helper.TestIdentityManager;
-
-import java.nio.ByteOrder;
-
-import static org.junit.Assert.assertNull;
import static org.traccar.helper.DecoderVerifier.verify;
public class TramigoProtocolDecoderTest extends ProtocolDecoderTest {
@@ -16,6 +12,9 @@ public class TramigoProtocolDecoderTest extends ProtocolDecoderTest {
public void testDecode() throws Exception {
TramigoProtocolDecoder decoder = new TramigoProtocolDecoder(new TramigoProtocol());
+
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ "80005408b000af000101b23903677f00c8436d3842616c697365204f6e653a20416c6c756d616765206d61726368652064e974656374e92c20676172e92c20302e3735206b6d20452064652045636f6c65204175746f726f757465206465204b696e73686173612c2056696c6c65206465204b696e73686173612c204b696e73686173612c2043442c202d342e33343130362c2031352e33343931352c2030313a3030204a616e2031202020454f46"))));
verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"8000011bb0009e0001015b93032ef6f35994a9545472616d69676f3a204d6f76696e672c20302e3930206b6d205345206f66204372616e6562726f6f6b20466972652053746174696f6e2c2050656e726974682c205379646e65792c2041552c202d33332e37303732322c203135302e37313735392c2053452077697468207370656564203337206b6d2f682c2031393a3438204a616e20342020454f46"))));