From efa23587b3ca8ea0c08e418a4c445cfa0062f110 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 26 Oct 2015 12:11:58 +1300 Subject: Modify Meitrack frame decoder --- .../traccar/protocol/MeitrackFrameDecoderTest.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/org/traccar/protocol/MeitrackFrameDecoderTest.java (limited to 'test') diff --git a/test/org/traccar/protocol/MeitrackFrameDecoderTest.java b/test/org/traccar/protocol/MeitrackFrameDecoderTest.java new file mode 100644 index 000000000..29d1b6148 --- /dev/null +++ b/test/org/traccar/protocol/MeitrackFrameDecoderTest.java @@ -0,0 +1,22 @@ +package org.traccar.protocol; + +import org.jboss.netty.buffer.ChannelBuffer; +import org.jboss.netty.buffer.ChannelBuffers; +import org.junit.Assert; +import org.junit.Test; +import org.traccar.ProtocolDecoderTest; + +public class MeitrackFrameDecoderTest extends ProtocolDecoderTest { + + @Test + public void testDecode() throws Exception { + + MeitrackFrameDecoder decoder = new MeitrackFrameDecoder(); + + Assert.assertEquals( + binary("24244e3132372c3836333037313031333830333036362c4141412c33352c2d312e3330323638302c33362e3835323133352c3135303430393231313032362c412c392c302c302e312c302c352c313635332c343039362c33323634382c3633397c30327c313030347c3930432c303030302c307c307c307c3346467c3330302c2a37430d0a"), + decoder.decode(null, null, binary("24244e3132372c3836333037313031333830333036362c4141412c33352c2d312e3330323638302c33362e3835323133352c3135303430393231313032362c412c392c302c302e312c302c352c313635332c343039362c33323634382c3633397c30327c313030347c3930432c303030302c307c307c307c3346467c3330302c2a37430d0a"))); + + } + +} -- cgit v1.2.3