aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol
diff options
context:
space:
mode:
authorEvgeny S Maksimov <me@vragam.net>2019-02-01 00:56:35 +0300
committerEvgeny S Maksimov <me@vragam.net>2019-02-01 00:56:35 +0300
commita3c540a952b5136b1de2900c8947847f70b39446 (patch)
tree87ff1bc50441e37573907fcffb0f13a3f491bd40 /test/org/traccar/protocol
parent83e97b472e16d5dc16826aa4688e7430b8ecec29 (diff)
downloadtrackermap-server-a3c540a952b5136b1de2900c8947847f70b39446.tar.gz
trackermap-server-a3c540a952b5136b1de2900c8947847f70b39446.tar.bz2
trackermap-server-a3c540a952b5136b1de2900c8947847f70b39446.zip
Frame decoder refactoring
Diffstat (limited to 'test/org/traccar/protocol')
-rw-r--r--test/org/traccar/protocol/NavisFrameDecoderTest.java12
1 files changed, 3 insertions, 9 deletions
diff --git a/test/org/traccar/protocol/NavisFrameDecoderTest.java b/test/org/traccar/protocol/NavisFrameDecoderTest.java
index 5e8d8fd36..0ebfeacd2 100644
--- a/test/org/traccar/protocol/NavisFrameDecoderTest.java
+++ b/test/org/traccar/protocol/NavisFrameDecoderTest.java
@@ -9,8 +9,7 @@ public class NavisFrameDecoderTest extends ProtocolTest {
@Test
public void testDecodeNtcb() throws Exception {
- NavisProtocolDecoder protocolDecoder = new NavisProtocolDecoder(null);
- NavisFrameDecoder frameDecoder = new NavisFrameDecoder(protocolDecoder);
+ NavisFrameDecoder frameDecoder = new NavisFrameDecoder();
verifyFrame(binary(
"404e5443010000000000000059009adb2a3e54250000000000ff1500040b0a1008291838001200760ee600000000000000000000000f1500040b0a10ac20703fb1aec23f00000000320149668f430000000000000000000000000000000000000000000000f3808080"),
@@ -21,14 +20,9 @@ public class NavisFrameDecoderTest extends ProtocolTest {
@Test
public void testDecodeFlex10() throws Exception {
- NavisProtocolDecoder protocolDecoder = new NavisProtocolDecoder(null);
- NavisFrameDecoder frameDecoder = new NavisFrameDecoder(protocolDecoder);
+ NavisFrameDecoder frameDecoder = new NavisFrameDecoder();
- verifyNull(protocolDecoder, binary(
- "404e544301000000c9b5f602130046c52a3e533a383639363936303439373232383235"));
-
- verifyNull(protocolDecoder, binary(
- "404e544301000000aaecf6021300c8712a3e464c4558b00a0a45ffff300a08080f8388"));
+ frameDecoder.setFlexDataSize(73);
verifyFrame(binary(
"7e54040000000400000030129957405c000b00632f9857405ccace03021e129101a103000000000000c4005ba3fe3b00000000120046100000000000001aff7f000080bfffff80000080bfffffffff9f"),