aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/helper/ChannelBufferToolsTest.java
diff options
context:
space:
mode:
authoruser <user@laptop.(none)>2012-10-21 21:42:46 +1300
committeruser <user@laptop.(none)>2012-10-21 21:42:46 +1300
commit0af1cebf1e2f3f719edf5391252fcd4004a75157 (patch)
treed897174c4890a8f4039e24f44020c02411c7c902 /test/org/traccar/helper/ChannelBufferToolsTest.java
parenta3441d3bcd02ec48e408957dfdc61dc6850bc339 (diff)
downloadtrackermap-server-0af1cebf1e2f3f719edf5391252fcd4004a75157.tar.gz
trackermap-server-0af1cebf1e2f3f719edf5391252fcd4004a75157.tar.bz2
trackermap-server-0af1cebf1e2f3f719edf5391252fcd4004a75157.zip
JT600 protocol fix
Diffstat (limited to 'test/org/traccar/helper/ChannelBufferToolsTest.java')
-rw-r--r--test/org/traccar/helper/ChannelBufferToolsTest.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/org/traccar/helper/ChannelBufferToolsTest.java b/test/org/traccar/helper/ChannelBufferToolsTest.java
index 16ff036b8..792770dab 100644
--- a/test/org/traccar/helper/ChannelBufferToolsTest.java
+++ b/test/org/traccar/helper/ChannelBufferToolsTest.java
@@ -20,4 +20,15 @@ public class ChannelBufferToolsTest {
factory.getBuffer(buf, 0, buf.length), 5);
assertEquals(1903, result);
}
+
+ @Test
+ public void testReadHexString() {
+ byte[] buf = {0x01,(byte)0x90,0x34};
+ String result = ChannelBufferTools.readHexString(
+ factory.getBuffer(buf, 0, buf.length), 5);
+ assertEquals("01903", result);
+
+ result = Long.valueOf(result).toString();
+ assertEquals("1903", result);
+ }
}