aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/GatorProtocolDecoderTest.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-22 15:26:17 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-22 15:26:17 +1300
commit1ca95d099df96d576a0eaddc6e42b5b41aed3e06 (patch)
tree65ae84eb5e301317263fd72c31cc54922c71eb96 /test/org/traccar/protocol/GatorProtocolDecoderTest.java
parent122a26d2822f35b27b9cb0b217916d6b821d9654 (diff)
downloadtrackermap-server-1ca95d099df96d576a0eaddc6e42b5b41aed3e06.tar.gz
trackermap-server-1ca95d099df96d576a0eaddc6e42b5b41aed3e06.tar.bz2
trackermap-server-1ca95d099df96d576a0eaddc6e42b5b41aed3e06.zip
Refactor protocol unit testing
Diffstat (limited to 'test/org/traccar/protocol/GatorProtocolDecoderTest.java')
-rw-r--r--test/org/traccar/protocol/GatorProtocolDecoderTest.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/org/traccar/protocol/GatorProtocolDecoderTest.java b/test/org/traccar/protocol/GatorProtocolDecoderTest.java
index 606f58942..6460e82de 100644
--- a/test/org/traccar/protocol/GatorProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/GatorProtocolDecoderTest.java
@@ -3,8 +3,8 @@ package org.traccar.protocol;
import org.jboss.netty.buffer.ChannelBuffers;
import org.junit.Assert;
import org.junit.Test;
+import org.traccar.ProtocolDecoderTest;
import org.traccar.helper.ChannelBufferTools;
-import static org.traccar.helper.DecoderVerifier.verify;
public class GatorProtocolDecoderTest extends ProtocolDecoderTest {
@@ -20,17 +20,17 @@ public class GatorProtocolDecoderTest extends ProtocolDecoderTest {
GatorProtocolDecoder decoder = new GatorProtocolDecoder(new GatorProtocol());
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
- "24248000260009632d141121072702059226180104367500000000c04700079c0c34000ad80b00ff000a0d"))));
+ verifyPosition(decoder, binary(
+ "24248000260009632d141121072702059226180104367500000000c04700079c0c34000ad80b00ff000a0d"));
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
- "24248100230CA23285100306145907022346901135294700000000C04001012C0E1100000021CB0D"))));
+ verifyPosition(decoder, binary(
+ "24248100230CA23285100306145907022346901135294700000000C04001012C0E1100000021CB0D"));
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
- "2424800023c2631e00111220104909833268648703804100000000c0470000000b4e00000000550d"))));
+ verifyPosition(decoder, binary(
+ "2424800023c2631e00111220104909833268648703804100000000c0470000000b4e00000000550d"));
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
- "24248000260009632d141121072702059226180104367500000000c04700079c0c34000ad80b00ff000a0d"))));
+ verifyPosition(decoder, binary(
+ "24248000260009632d141121072702059226180104367500000000c04700079c0c34000ad80b00ff000a0d"));
}