aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-05-04 23:18:23 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-05-04 23:18:23 +1200
commite74de5663035c9bfed515f7dcc1f7e50e5accdde (patch)
tree5b2e658e850067e8b064c9040cc511f2a3b05ca6 /test/org/traccar
parentbee76d7ba5766a291ec78d46cc0dad0d74581748 (diff)
downloadtrackermap-server-e74de5663035c9bfed515f7dcc1f7e50e5accdde.tar.gz
trackermap-server-e74de5663035c9bfed515f7dcc1f7e50e5accdde.tar.bz2
trackermap-server-e74de5663035c9bfed515f7dcc1f7e50e5accdde.zip
Add new Noran test cases
Diffstat (limited to 'test/org/traccar')
-rw-r--r--test/org/traccar/protocol/NoranProtocolDecoderTest.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/org/traccar/protocol/NoranProtocolDecoderTest.java b/test/org/traccar/protocol/NoranProtocolDecoderTest.java
index 8a6596817..e51741835 100644
--- a/test/org/traccar/protocol/NoranProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/NoranProtocolDecoderTest.java
@@ -3,9 +3,9 @@ package org.traccar.protocol;
import java.nio.ByteOrder;
import org.jboss.netty.buffer.ChannelBuffers;
import static org.junit.Assert.assertNull;
-import static org.traccar.helper.DecoderVerifier.verify;
import org.junit.Test;
import org.traccar.helper.ChannelBufferTools;
+import static org.traccar.helper.DecoderVerifier.verify;
public class NoranProtocolDecoderTest extends ProtocolDecoderTest {
@@ -13,6 +13,12 @@ public class NoranProtocolDecoderTest extends ProtocolDecoderTest {
public void testDecode() throws Exception {
NoranProtocolDecoder decoder = new NoranProtocolDecoder(null);
+
+ verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ "3400080001090000000000001D43A29BE842E62520424E523039423036363932000031322D30332D30352031313A34373A343300"))));
+
+ verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ "34000800010c000000000080a3438e20944149bd07c24e523039423139323832000031352d30342d32362030383a34333a353300"))));
assertNull(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"0f0000004e52303946303431353500"))));