aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/TytanProtocolDecoderTest.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/TytanProtocolDecoderTest.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/TytanProtocolDecoderTest.java')
-rw-r--r--test/org/traccar/protocol/TytanProtocolDecoderTest.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/org/traccar/protocol/TytanProtocolDecoderTest.java b/test/org/traccar/protocol/TytanProtocolDecoderTest.java
index 47c865d58..d291baa6e 100644
--- a/test/org/traccar/protocol/TytanProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/TytanProtocolDecoderTest.java
@@ -2,8 +2,8 @@ package org.traccar.protocol;
import org.jboss.netty.buffer.ChannelBuffers;
import org.junit.Test;
+import org.traccar.ProtocolDecoderTest;
import org.traccar.helper.ChannelBufferTools;
-import static org.traccar.helper.DecoderVerifier.verify;
public class TytanProtocolDecoderTest extends ProtocolDecoderTest {
@@ -12,17 +12,17 @@ public class TytanProtocolDecoderTest extends ProtocolDecoderTest {
TytanProtocolDecoder decoder = new TytanProtocolDecoder(new TytanProtocol());
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
- "B5005690000068494F561CEAE932325FD28D11A299000702000063045532030066013567018768014B6901286B0240396C04030785986D013E7F040000A7CE81040000A76C82027EAB83080FA01068FFFF0F3C880202583156"))));
+ verifyPositions(decoder, binary(
+ "B5005690000068494F561CEAE932325FD28D11A299000702000063045532030066013567018768014B6901286B0240396C04030785986D013E7F040000A7CE81040000A76C82027EAB83080FA01068FFFF0F3C880202583156"));
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
- "b50069a00000689d315604512b32378f1a8e9fe094005a04d7c84b41020300ab250402140c0702c0006501006601006b0280646c0402883db0315604525732378f1d8e9fdd94005a04d7c84b41020300ab250402140c0702c0006501006601006b0280646c0402883db08887"))));
+ verifyPositions(decoder, binary(
+ "b50069a00000689d315604512b32378f1a8e9fe094005a04d7c84b41020300ab250402140c0702c0006501006601006b0280646c0402883db0315604525732378f1d8e9fdd94005a04d7c84b41020300ab250402140c0702c0006501006601006b0280646c0402883db08887"));
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
- "b50028080000689d215602772f00378f1b8e9fdd98005a042efb3e4102030000000402140c070200000901"))));
+ verifyPositions(decoder, binary(
+ "b50028080000689d215602772f00378f1b8e9fdd98005a042efb3e4102030000000402140c070200000901"));
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
- "b500280a0000689d215602772f00378f1b8e9fdd98005a042efb3e4102030000000402140c07020000da20"))));
+ verifyPositions(decoder, binary(
+ "b500280a0000689d215602772f00378f1b8e9fdd98005a042efb3e4102030000000402140c07020000da20"));
}