aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/org/traccar/helper/ObdDecoderTest.java7
-rw-r--r--test/org/traccar/protocol/UlbotechProtocolDecoderTest.java3
2 files changed, 10 insertions, 0 deletions
diff --git a/test/org/traccar/helper/ObdDecoderTest.java b/test/org/traccar/helper/ObdDecoderTest.java
index fb74f5d3c..238f3e0a6 100644
--- a/test/org/traccar/helper/ObdDecoderTest.java
+++ b/test/org/traccar/helper/ObdDecoderTest.java
@@ -7,6 +7,13 @@ public class ObdDecoderTest {
@Test
public void testDecode() {
+
+ Assert.assertEquals(83, ObdDecoder.decode(0x01, 0x05, "7b").getValue());
+ Assert.assertEquals(1225, ObdDecoder.decode(0x01, 0x0C, "1324").getValue());
+ Assert.assertEquals(20, ObdDecoder.decode(0x01, 0x0D, "14").getValue());
+ Assert.assertEquals(64050, ObdDecoder.decode(0x01, 0x31, "fa32").getValue());
+ Assert.assertEquals(25, ObdDecoder.decode(0x01, 0x2F, "41").getValue());
+
}
}
diff --git a/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java b/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java
index 7e321fa8e..30e040e3d 100644
--- a/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java
@@ -13,6 +13,9 @@ public class UlbotechProtocolDecoderTest extends ProtocolDecoderTest {
UlbotechProtocolDecoder decoder = new UlbotechProtocolDecoder(new UlbotechProtocol());
verifyPosition(decoder, binary(
+ "f8010108679650230651689dc8e45b010e01194a26fbd47fa6001f003c0054030402420000040400024d7b0506037c18692212071131057f410c0ee0310d1b312f41413112ef0804000dd59fcc32f8"));
+
+ verifyPosition(decoder, binary(
"f8010103596580419465449da89d16010efe5580fe0923d82100140129005903040242000004040001a7f10506037818be220e070e31057b410c1324310d144131fa3208040020b1418297f8"));
verifyPosition(decoder, binary(