aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-02-06 11:46:02 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-02-06 11:46:02 +1300
commita40d11eb40da51919eb21bef57865b149d4c3d2d (patch)
treef802fe156eff0f64914f702e02b7dcd81769bf59 /test/org/traccar/protocol
parent5a11de47a894bc27dc7c52c0befa10a5011c400b (diff)
downloadtraccar-server-a40d11eb40da51919eb21bef57865b149d4c3d2d.tar.gz
traccar-server-a40d11eb40da51919eb21bef57865b149d4c3d2d.tar.bz2
traccar-server-a40d11eb40da51919eb21bef57865b149d4c3d2d.zip
Add Navigil unit tests
Diffstat (limited to 'test/org/traccar/protocol')
-rw-r--r--test/org/traccar/protocol/NavigilProtocolDecoderTest.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/org/traccar/protocol/NavigilProtocolDecoderTest.java b/test/org/traccar/protocol/NavigilProtocolDecoderTest.java
index 100e178d8..289018951 100644
--- a/test/org/traccar/protocol/NavigilProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/NavigilProtocolDecoderTest.java
@@ -14,8 +14,11 @@ public class NavigilProtocolDecoderTest {
NavigilProtocolDecoder decoder = new NavigilProtocolDecoder(null);
decoder.setDataManager(new TestDataManager());
- //byte[] buf1 = {0x40,0x4E,0x54,0x43,0x01,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x13,0x00,0x44,0x34,0x2A,0x3E,0x53,0x3A,0x38,0x36,0x31,0x37,0x38,0x35,0x30,0x30,0x35,0x32,0x30,0x35,0x30,0x37,0x39};
- //assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, buf1)));
+ byte[] buf1 = {0x01,0x00,0x43,0x00,0x04,0x00,0x20,0x00,0x00,0x00,(byte)0xf6,0x02,0x03,0x08,0x02,0x00,(byte)0xe7,(byte)0xcd,0x0f,0x51,0x0c,0x00,0x00,0x00,0x3b,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
+ assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, buf1)));
+
+ byte[] buf2 = {0x01,0x00,(byte)0xb3,0x00,0x0f,0x00,0x24,0x00,0x00,0x00,(byte)0xf4,(byte)0xa8,0x03,0x08,0x02,0x00,(byte)0xca,0x0c,0x11,0x51,(byte)0xef,(byte)0x88,(byte)0x85,(byte)0xf0,(byte)0xb8,0x2e,0x6d,0x13,0x04,0x00,(byte)0xc0,0x04,0x03,0x00,0x00,0x00};
+ assertNotNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, buf2)));
}