Package org.traccar.helper

Examples of org.traccar.helper.TestDataManager


public class Tlt2hProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        verify(decoder.decode(null, null,
                "#357671030946351#V500#0000#AUTO#1\r\n" +
                "#$GPRMC,223835.000,A,0615.3545,S,10708.5779,E,14.62,97.41,070313,,,D*70\r\n"));

 
View Full Code Here


public class H02ProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        H02ProtocolDecoder decoder = new H02ProtocolDecoder(new TestDataManager(), null, null);
       
        assertNull(decoder.decode(null, null, ChannelBuffers.copiedBuffer(
                "*HQ,353588020068342,V1,000000,V,0.0000,0,0.0000,0,0.00,0.00,000000,ffffffff,000106,000002,000203,004c87,16#", Charset.defaultCharset())));

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

public class MegastekProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        verify(decoder.decode(null, null,
                "STX,GerAL22,$GPRMC,174752.000,A,3637.060059,S,6416.2354,W,0.00,0.00,030812,,,A*55,F,,imei:861785000249353,05,180.6,Battery=100%,,1,722,310,0FA6,39D0;8F"));

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

public class SkypatrolProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
                new int[]{0x00,0x05,0x02,0x10,0x04,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x0D,0x31,0x31,0x34,0x37,0x37,0x35,0x38,0x33,0x00,0xCB,0x00,0x00,0x00,0x00,0x0E,0x11,0x07,0x0C,0x01,0x01,0x84,0xD0,0x32,0xFB,0x38,0x41,0x37,0x00,0x00,0x00,0x00,0x16,0x07,0x2B,0x00,0x00,0x17,0x05,0x00,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x4E,0x0C,0x07,0x11,0x16,0x07,0x2C,0x10,0x59,0x00,0x05,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x00,0x03,0x10,0x02,0x60,0xB7,0x36,0x3B,0x63,0x06,0xC1,0x1A,0x00,0xB7,0x36,0x37,0xF2,0x06,0xBF,0x19,0xB7,0x36,0x37,0xF1,0x06,0xB5,0x0E,0xB7,0x36,0x38,0xB1,0x06,0xBB,0x0B,0xB7,0x36,0x3B,0x61,0x06,0xB8,0x0A,0xB7,0x36,0x37,0xF3,0x06,0xB7,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C}))));
       
        //verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
View Full Code Here

public class IntellitracProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        assertNull(decoder.decode(null, null, "$OK:TRACKING"));

        verify(decoder.decode(null, null,
                "1010000002,20030217132813,121.646060,25.061725,20,157,133,7,0,11,15,0.096,0.000"));
View Full Code Here

public class RuptelaProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        int[] buf1 = {0x00,0x79,0x00,0x00,0x0b,0x1a,0x2a,0x55,0x85,0xc3,0x01,0x00,0x02,0x4e,0x9c,0x03,0x69,0x00,0x00,0x0f,0x10,0x17,0x33,0x20,0x8f,0xf4,0x5e,0x07,0xb3,0x1b,0x57,0x0a,0x00,0x10,0x09,0x09,0x06,0x05,0x01,0x1b,0x1a,0x02,0x00,0x03,0x00,0x1c,0x01,0xad,0x01,0x02,0x1d,0x33,0x8e,0x16,0x00,0x00,0x02,0x96,0x00,0x00,0x60,0x1a,0x41,0x01,0x4b,0xc1,0x6d,0x00,0x4e,0x9c,0x03,0x84,0x00,0x00,0x0f,0x10,0x4f,0xdf,0x20,0x90,0x0d,0x20,0x07,0x51,0x03,0xb0,0x0a,0x00,0x13                ,0x08,0x09,0x06,0x05,0x01,0x1b,0x1a,0x02,0x00,0x03,0x00,0x1c,0x01,0xad,0x01,0x02,0x1d,0x33,0xb1,0x16,0x00,0x00,0x02,0x96,0x00,0x00,0x60,0x1a,0x41,0x01,0x4b,0xc1,0xea,0x00,0x28,0xf9};
        verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf1))));
       
        int[] buf2 = {0x00,0x92,0x00,0x00,0x0c,0x07,0xa6,0xba,0xcd,0x47,0x01,0x00,0x05,0x52,0xdb,0x5c,0xc2,0x00,0x00,0x18,0x7b,0x8b,0x25,0x1a,0xce,0x47,0x8e,0x08,0x7c,0x04,0x4c,0x0a,0x00,0x00,0x09,0x07,0x00,0x00,0x00,0x00,0x52,0xdb,0x5c,0xfe,0x00,0x00,0x18,0x7b,0x8a,0xb0,0x1a,0xce,0x47,0x19,0x08,0x79,0x04,0x4c,0x09,0x00,0x00,0x0b,0x07,0x00,0x00,0x00,0x00,0x52,0xdb,0x5d,0x3a,0x00,0x00,0x18,0x7b,0x8b,0x25,0x1a,0xce,0x47,0x4b,0x08,0x9d,0x04,0x4c,0x09,0x00,0x00,0x09,0x07,0x00,0x00,0x00,0x00,0x52,0xdb,0x5d,0x76,0x00,0x00,0x18,0x7b,0x8b,0x9a,0x1a,0xce,0x47,0x5c,0x08,0xcd,0x04,0x4c,0x08,0x00,0x00,0x09,0x07,0x00,0x00,0x00,0x00,0x52,0xdb,0x5d,0xb2,0x00,0x00,0x18,0x7b,0x8b,0x14,0x1a,0xce,0x46,0xe7,0x08,0xb3,0x04,0x4c,0x08,0x00,0x00,0x09,0x07,0x00,0x00,0x00,0x00,0x41,0xcb};
View Full Code Here

public class WialonProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        assertNull(decoder.decode(null, null, "#L#123456789012345;test"));
       
        assertNull(decoder.decode(null, null, "#L#2002;NA"));
       
View Full Code Here

public class GatorProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        int[] buf1 = {0x24,0x24,0x81,0x00,0x23,0x0C,0xA2,0x32,0x85,0x10,0x03,0x06,0x14,0x59,0x07,0x02,0x23,0x46,0x90,0x11,0x35,0x29,0x47,0x00,0x00,0x00,0x00,0xC0,0x40,0x01,0x01,0x2C,0x0E,0x11,0x00,0x00,0x00,0x21,0xCB,0x0D};
        verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf1))));

        int[] buf2 = {0x24,0x24,0x80,0x00,0x23,0xc2,0x63,0x1e,0x00,0x11,0x12,0x20,0x10,0x49,0x09,0x83,0x32,0x68,0x64,0x87,0x03,0x80,0x41,0x00,0x00,0x00,0x00,0xc0,0x47,0x00,0x00,0x00,0x0b,0x4e,0x00,0x00,0x00,0x00,0x55,0x0d};
View Full Code Here

public class SanavProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        SanavProtocolDecoder decoder = new SanavProtocolDecoder(new TestDataManager(), null, null);
       
        verify(decoder.decode(null, null,
                "imei=352024028982787&rmc=$GPRMC,103048.000,A,4735.0399,N,01905.2895,E,0.00,0.00,171013,,*05,AUTO-4095mv"));

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

public class TelikProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        assertNull(decoder.decode(null, null,
                "0026436729|232|01|003002030"));

        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.