diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-26 12:27:41 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-26 12:27:41 +1300 |
commit | 4acc359d664db81242f6c3a1a7a6dedcf2ab465a (patch) | |
tree | e901c5d89922147e551f241d1e5bc9801de3b9d3 /test/org/traccar/protocol | |
parent | 96f529e32083d916883c3757ac88012758fdc90c (diff) | |
download | trackermap-server-4acc359d664db81242f6c3a1a7a6dedcf2ab465a.tar.gz trackermap-server-4acc359d664db81242f6c3a1a7a6dedcf2ab465a.tar.bz2 trackermap-server-4acc359d664db81242f6c3a1a7a6dedcf2ab465a.zip |
Modify JT600 frame decoder
Diffstat (limited to 'test/org/traccar/protocol')
-rw-r--r-- | test/org/traccar/protocol/Jt600FrameDecoderTest.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/Jt600FrameDecoderTest.java b/test/org/traccar/protocol/Jt600FrameDecoderTest.java new file mode 100644 index 000000000..d4b124db7 --- /dev/null +++ b/test/org/traccar/protocol/Jt600FrameDecoderTest.java @@ -0,0 +1,24 @@ +package org.traccar.protocol; + +import org.junit.Assert; +import org.junit.Test; +import org.traccar.ProtocolDecoderTest; + +public class Jt600FrameDecoderTest extends ProtocolDecoderTest { + + @Test + public void testDecode() throws Exception { + + Jt600FrameDecoder decoder = new Jt600FrameDecoder(); + + Assert.assertEquals( + binary("28333132303832303032392C5730312C30323535332E333535352C452C323433382E303939372C532C412C3137313031322C3035333333392C302C382C32302C362C33312C352C32302C323029"), + decoder.decode(null, null, binary("28333132303832303032392C5730312C30323535332E333535352C452C323433382E303939372C532C412C3137313031322C3035333333392C302C382C32302C362C33312C352C32302C323029"))); + + Assert.assertEquals( + binary("24312082002911001B171012053405243809970255335555000406140003EE2B91044D1F02"), + decoder.decode(null, null, binary("24312082002911001B171012053405243809970255335555000406140003EE2B91044D1F02"))); + + } + +} |