aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-11-21 10:52:34 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-11-21 10:52:34 +1300
commit40674d8338c679a958ced0a94c4b61716775045d (patch)
tree1d2dfc4c2b33c2e8399253311ac2a23b2c9c08a6
parente52ccadfb975476b1a6412e615a7109ff42f787a (diff)
downloadtrackermap-server-40674d8338c679a958ced0a94c4b61716775045d.tar.gz
trackermap-server-40674d8338c679a958ced0a94c4b61716775045d.tar.bz2
trackermap-server-40674d8338c679a958ced0a94c4b61716775045d.zip
Add another Meiligao unit test case
-rw-r--r--src/org/traccar/protocol/MeiligaoFrameDecoder.java4
-rw-r--r--test/org/traccar/protocol/MeiligaoProtocolDecoderTest.java5
2 files changed, 5 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/MeiligaoFrameDecoder.java b/src/org/traccar/protocol/MeiligaoFrameDecoder.java
index 6dcc6fd9c..9fb530f8a 100644
--- a/src/org/traccar/protocol/MeiligaoFrameDecoder.java
+++ b/src/org/traccar/protocol/MeiligaoFrameDecoder.java
@@ -26,9 +26,7 @@ public class MeiligaoFrameDecoder extends FrameDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx,
- Channel channel,
- ChannelBuffer buf) throws Exception {
+ ChannelHandlerContext ctx, Channel channel, ChannelBuffer buf) throws Exception {
// Strip not '$' (0x24) bytes from the beginning
while (buf.readable() && buf.getUnsignedByte(buf.readerIndex()) != 0x24) {
diff --git a/test/org/traccar/protocol/MeiligaoProtocolDecoderTest.java b/test/org/traccar/protocol/MeiligaoProtocolDecoderTest.java
index 6d0ba50d5..0c3c570f5 100644
--- a/test/org/traccar/protocol/MeiligaoProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/MeiligaoProtocolDecoderTest.java
@@ -12,8 +12,11 @@ public class MeiligaoProtocolDecoderTest extends ProtocolDecoderTest {
MeiligaoProtocolDecoder decoder = new MeiligaoProtocolDecoder(new MeiligaoProtocol());
+ verifyNothing(decoder, binary(
+ "24240011671440258855405000b24d0d0a"));
+
verifyPosition(decoder, binary(
- "242400706796502079108999553131333131382e3030302c412c313033372e393637382c4e2c30363132312e353637392c572c302e35342c322e34322c3330303931352c2c2c412a37307c302e37377c392e397c303030307c303030302c303161327c3030313138373132374cae0d0a"),
+ "242400706796502079108999553131333131382e3030302c412c313033372e393637382c4e2c30363132312e353637392c572c302e35342c322e34322c3330303931352c2c2c412a37307c302e37377c392e397c303030307c303030302c303161327c3030313138373132374cae0d0a"),
position("2015-09-30 11:31:18.000", true, 10.63280, -61.35947));
verifyPosition(decoder, binary(