diff options
Diffstat (limited to 'src/test/java/org/traccar')
-rw-r--r-- | src/test/java/org/traccar/helper/ObdDecoderTest.java | 10 | ||||
-rw-r--r-- | src/test/java/org/traccar/protocol/UlbotechProtocolDecoderTest.java | 3 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/test/java/org/traccar/helper/ObdDecoderTest.java b/src/test/java/org/traccar/helper/ObdDecoderTest.java index 1ffe68c8b..d5071bd51 100644 --- a/src/test/java/org/traccar/helper/ObdDecoderTest.java +++ b/src/test/java/org/traccar/helper/ObdDecoderTest.java @@ -9,11 +9,11 @@ public class ObdDecoderTest { @Test public void testDecode() { - assertEquals(83, ObdDecoder.decode(0x01, "057b").getValue()); - assertEquals(1225, ObdDecoder.decode(0x01, "0C1324").getValue()); - assertEquals(20, ObdDecoder.decode(0x01, "0D14").getValue()); - assertEquals(64050, ObdDecoder.decode(0x01, "31fa32").getValue()); - assertEquals(25, ObdDecoder.decode(0x01, "2F41").getValue()); + assertEquals(83L, ObdDecoder.decode(0x01, "057b").getValue()); + assertEquals(1225L, ObdDecoder.decode(0x01, "0C1324").getValue()); + assertEquals(20L, ObdDecoder.decode(0x01, "0D14").getValue()); + assertEquals(64050L, ObdDecoder.decode(0x01, "31fa32").getValue()); + assertEquals(25L, ObdDecoder.decode(0x01, "2F41").getValue()); } diff --git a/src/test/java/org/traccar/protocol/UlbotechProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/UlbotechProtocolDecoderTest.java index 8c820183b..a2bc1b46e 100644 --- a/src/test/java/org/traccar/protocol/UlbotechProtocolDecoderTest.java +++ b/src/test/java/org/traccar/protocol/UlbotechProtocolDecoderTest.java @@ -10,6 +10,9 @@ public class UlbotechProtocolDecoderTest extends ProtocolTest { UlbotechProtocolDecoder decoder = new UlbotechProtocolDecoder(null); + verifyPosition(decoder, binary( + "f801010353323083177450a703f6f0010efe55a31a0923d01400050070007003040a42000004040070cca00506039b1876220f060800000000000000000725310553410c0c9e310d05310f4641100440311119411f00476101810f8000310487411f00480804203a14c009033320159310f8")); + verifyNull(decoder, buffer( "*TS01,353323081464660#")); |