Package org.traccar.helper

Examples of org.traccar.helper.TestDataManager


public class PiligrimProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        PiligrimProtocolDecoder decoder = new PiligrimProtocolDecoder(new TestDataManager(), null, null);
       
        HttpRequest msg1 = new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST, "/bingps?imei=868204005544720&csq=18&vout=00&vin=4050&dataid=00000000");
        int[] buf1 = {0xff,0xf2,0x20,0x0d,0x41,0x10,0x06,0x1a,0x32,0x35,0x4f,0x34,0x22,0x31,0x00,0x62,0x00,0x0a,0x00,0x05,0x17,0x3b,0x00,0x00,0xa1,0x01,0x00,0x03,0x00,0x00,0x5e,0x00,0xff,0xf2,0x20,0x0d,0x41,0x10,0x10,0x09,0x32,0x35,0x4f,0x2b,0x22,0x31,0x00,0x42,0x00,0x0b,0x00,0x0e,0x17,0x3b,0x00,0x00,0x9f,0x01,0x00,0x07,0x00,0x00,0x60,0x00};
        msg1.setContent(ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf1)));
        verify(decoder.decode(null, null, msg1));
View Full Code Here


public class EelinkProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
                new int[] {0x67,0x67,0x01,0x00,0x0b,0x00,0x1b,0x03,0x54,0x18,0x80,0x46,0x61,0x83,0x49,0x01}))));
       
        assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
View Full Code Here

public class Ev603ProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        assertNull(decoder.decode(null, null, "!1,123456789012345"));

        assertNull(decoder.decode(null, null, "!5,17,V"));
View Full Code Here

public class SuntechProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        SuntechProtocolDecoder decoder = new SuntechProtocolDecoder(new TestDataManager(), null, null);
       
        assertNull(decoder.decode(null, null, "SA200ALV;317652"));

        verify(decoder.decode(null, null,
                "SA200STT;317652;042;20120718;15:37:12;16d41;-15.618755;-056.083241;000.024;000.00;8;1;41548;12.17;100000;2;1979"));
View Full Code Here

public class T55ProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        T55ProtocolDecoder decoder = new T55ProtocolDecoder(new TestDataManager(), null, null);
       
        assertNull(decoder.decode(null, null, "$GPFID,ID123456ABC"));

        assertNull(decoder.decode(null, null, "$PGID,359853000144328*0F"));

 
View Full Code Here

public class EnforaProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
                new int[] {0x00,0x0A,0x08,0x00,0x20,0x20,0x20,0x20,0x20,0x30,0x31,0x31,0x30,0x37,0x30,0x30,0x30,0x30,0x35,0x37,0x30,0x32,0x36,0x37}))));
View Full Code Here

public class Gt06ProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
                new int[] {0x78,0x78,0x11,0x01,0x01,0x23,0x45,0x67,0x89,0x01,0x23,0x45,0x10,0x0B,0x32,0x01,0x00,0x01,0x71,0x93,0x0D,0x0A}))));

        verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
View Full Code Here

public class XexunProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        XexunProtocolDecoder decoder = new XexunProtocolDecoder(new TestDataManager(), null, null);
       
        verify(decoder.decode(null, null,
                "GPRMC,043435.000,A,811.299200,S,11339.9500,E,0.93,29.52,160313,00,0000.0,A*65,F,,imei:359585014597923,"));

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

public class TeltonikaProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
                new int[] {0x00,0x0F,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x30,0x31,0x32,0x33,0x34,0x35}))));
       
        verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
View Full Code Here

public class TopflytechProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        verify(decoder.decode(null, null,
                "(880316890094910BP00XG00b600000000L00074b54S00000000R0C0F0014000100f0130531152205A0706.1395S11024.0965E000.0251.25"));

    }
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.