Package org.traccar.helper

Examples of org.traccar.helper.TestDataManager


public class CellocatorProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        CellocatorProtocolDecoder decoder = new CellocatorProtocolDecoder(new TestDataManager(), null, null);

        int[] buf1 = {0x4D,0x43,0x47,0x50,0x00,0x06,0x00,0x00,0x00,0x08,0x1A,0x02,0x02,0x12,0x04,0x00,0x00,0x00,0x21,0x00,0x62,0x30,0x00,0x00,0x00,0x6B,0x00,0xE1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE5,0xA1,0x00,0x04,0x02,0x06,0x61,0x4E,0xA3,0x03,0x18,0x1A,0x57,0x03,0x4E,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0x25,0x07,0x14,0x03,0xD6,0x07,0x49};
        verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertArray(buf1))));
       
        int[] buf2 = {0x4d,0x43,0x47,0x50,0x00,0x01,0x01,0x00,0x00,0x08,0x01,0x1f,0x04,0x18,0x04,0x00,0x00,0x00,0x20,0x01,0x00,0x00,0x00,0x00,0x00,0x5e,0x75,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x85,0x00,0x04,0x02,0x04,0xda,0x4d,0xa3,0x03,0x67,0x19,0x57,0x03,0xe8,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x14,0x15,0x10,0x07,0xdd,0x07,0xf7};
View Full Code Here


public class AtrackProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        AtrackProtocolDecoder decoder = new AtrackProtocolDecoder(new TestDataManager(), null, null);

        //int[] buf1 = {0xfe,0x02,0x00,0x01,0x41,0x04,0xd8,0xf1,0x96,0x82,0x00,0x01};
        //assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf1))));

        int[] buf2 = {0x40,0x50,0x99,0x3f,0x00,0x5c,0x00,0x02,0x00,0x01,0x41,0x04,0xd8,0xf1,0x96,0x82,0x52,0x56,0x66,0xc2,0x52,0x56,0x8c,0x3c,0x52,0x56,0x8c,0x63,0xff,0xc8,0x33,0x84,0x02,0x69,0x88,0x85,0x00,0x00,0x02,0x00,0x00,0x09,0xcf,0x03,0xde,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xd0,0x07,0xd0,0x00,0x52,0x56,0x66,0xc2,0x52,0x56,0x8c,0x5a,0x52,0x56,0x8c,0x63,0xff,0xc8,0x33,0x84,0x02,0x69,0x88,0x85,0x00,0x00,0x02,0x00,0x00,0x09,0xcf,0x03,0xde,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xd0,0x07,0xd0,0x00};
View Full Code Here

public class Xt7ProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        Xt7ProtocolDecoder decoder = new Xt7ProtocolDecoder(new TestDataManager(), null, null);
        ChannelBufferFactory factory = new HeapChannelBufferFactory();

        byte[] buf1 = {0x53,0x54,0x58,0x32,0x30,0x31,0x30,0x31,0x30,0x31,0x38,0x30,0x31,0x20,0x20,0x20,0x20,0x20,0x20,0x02,0x6A,0x24,0x47,0x50,0x52,0x4D,0x43,0x2C,0x31,0x30,0x31,0x30,0x35,0x33,0x2E,0x30,0x30,0x30,0x2C,0x41,0x2C,0x32,0x32,0x33,0x32,0x2E,0x37,0x36,0x30,0x37,0x2C,0x4E,0x2C,0x31,0x31,0x34,0x30,0x34,0x2E,0x37,0x36,0x36,0x39,0x2C,0x45,0x2C,0x30,0x2E,0x30,0x30,0x2C,0x2C,0x32,0x33,0x31,0x31,0x31,0x30,0x2C,0x2C,0x2C,0x41,0x2A,0x37,0x46,0x2C,0x34,0x36,0x30,0x2C,0x30,0x30,0x2C,0x32,0x37,0x39,0x35,0x2C,0x30,0x45,0x36,0x41,0x2C,0x31,0x34,0x2C,0x39,0x34,0x2C,0x31,0x30,0x30,0x30,0x2C,0x30,0x30,0x30,0x30,0x2C,0x39,0x31,0x2C,0x54,0x69,0x6D,0x65,0x72,0x3B,0x31,0x44,0x0D,0x0A};
        verify(decoder.decode(null, null, factory.getBuffer(buf1, 0, buf1.length)));
View Full Code Here

public class HaicomProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        HaicomProtocolDecoder decoder = new HaicomProtocolDecoder(new TestDataManager(), null, null);

        verify(decoder.decode(null, null,
                "$GPRS123456789012345,602S19A,100915,063515,7240649312041079,0019,3156,111000,10004,0000,11111,00LH#V037"));
       
        verify(decoder.decode(null, null,
View Full Code Here

public class SyrusProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        SyrusProtocolDecoder decoder = new SyrusProtocolDecoder(new TestDataManager(), null, null, false);

        assertNotNull(decoder.decode(null, null,
                ">RPV00000+3739438-1220384601512612;ID=1234;*7F"));

        verify(decoder.decode(null, null,
View Full Code Here

public class CarscopProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        CarscopProtocolDecoder decoder = new CarscopProtocolDecoder(new TestDataManager(), null, null);

        verify(decoder.decode(null, null,
                "*040331141830UB05123456789012345061825A2934.0133N10627.2544E000.0040331309.6200000000L000000"));

        verify(decoder.decode(null, null,
View Full Code Here

public class Tk102ProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        Tk102ProtocolDecoder decoder = new Tk102ProtocolDecoder(new TestDataManager(), null, null);

        assertNull(decoder.decode(null, null, ""));

        assertNull(decoder.decode(null, null,
                "[!0000000081r(353327023367238,TK102-W998_01_V1.1.001_130219,255,001,255,001,0,100,100,0,internet,0000,0000,0,0,255,0,4,1,11,00)"));
View Full Code Here

public class LaipacProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        LaipacProtocolDecoder decoder = new LaipacProtocolDecoder(new TestDataManager(), null, null);

        assertNull(decoder.decode(null, null, "$AVSYS,99999999,V1.50,SN0000103,32768*15"));
       
        assertNull(decoder.decode(null, null, "$ECHK,99999999,0*35"));
       
View Full Code Here

public class GlobalSatProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        GlobalSatProtocolDecoder decoder = new GlobalSatProtocolDecoder(new TestDataManager(), null, null);

        assertNull(decoder.decode(null, null, "GSh,131826789036289,3,M,ea04*3d"));

        //SORPZAB27GHKLMN*U!
        /*verify(decoder.decode(null, null,
View Full Code Here

public class CarTrackProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        CarTrackProtocolDecoder decoder = new CarTrackProtocolDecoder(new TestDataManager(), null, null);

        verify(decoder.decode(null, null,
                "$$2222234???????&A9955&B102904.000,A,2233.0655,N,11404.9440,E,0.00,,030109,,*17|6.3|&C0100000100&D000024?>&E10000000&Y00100020"));
       
        verify(decoder.decode(null, null,
View Full Code Here

TOP

Related Classes of org.traccar.helper.TestDataManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.