Package org.traccar.helper

Examples of org.traccar.helper.TestDataManager


public class WondexProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        WondexProtocolDecoder decoder = new WondexProtocolDecoder(new TestDataManager(), null, null);
       
        verify(decoder.decode(null, null,
                "1044989601,20130323074605,0.000000,90.000000,0,000,0,0,2"));

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


public class Pt3000ProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        verify(decoder.decode(null, null,
                "%356939010012099,$GPRMC,124945.752,A,4436.6245,N,01054.4634,E,0.11,358.52,060408,,,A,+393334347445,N028d"));

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

public class Gps103ProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        // Log on request
        assertNull(decoder.decode(null, null, null, "##,imei:359586015829802,A"));

        // Heartbeat package
View Full Code Here

public class OrionProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertArray(
                new int[] {0x50,0x57,0x00,0x41,0x07,0x36,0x7C,0x24,0x2B,0x44,0x09,0x01,0xAD,0xE9,0x7D,0x01,0x63,0x14,0x3B,0x07,0xB0,0x03,0x00,0x00,0x00,0x00,0x0D,0x04,0x19,0x17,0x38,0x2D,0x00,0x0B,0x01,0x01,0x00,0x05,0x11,0x00,0x00,0x00,0x00,0x06,0x82,0x05,0x00,0x00,0x00,0x8E,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x8C,0x03,0x00,0x84,0x03,0x00,0x85,0x03,0x00,0x09,0x0A,0x00,0x00,0x00,0x00,0x48,0x01,0x00,0x00,0x00,0x8A,0xFC}))));

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

public class TrackboxProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        assertNull(decoder.decode(null, null, "a=connect&v=11&i=111111111111111"));

        verify(decoder.decode(null, null,
                "183457.999,5126.0247N,00002.8686E,5.2,70.4,3,57.63,32.11,17.32,150507,05"));
View Full Code Here

public class GotopProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        assertNull(decoder.decode(null, null, ""));
       
        assertNull(decoder.decode(null, null, "353327020412763,CMD-X"));
View Full Code Here

public class M2mProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        int[] buf1 = {0x23,0x5A,0x3C,0x2A,0x26,0x24,0x21,0x5C,0x28,0x7D,0x70,0x21,0x2A,0x21,0x25,0x4C,0x7C,0x64,0x21,0x22,0x0B,0x0B,0x0B};
        assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf1))));

        int[] buf2 = {0xA6,0xE1,0x2C,0x2A,0xAA,0xDA,0x46,0x28,0x32,0x6B,0x20,0x59,0x57,0x6E,0x30,0x20,0x2A,0x2F,0xE8,0x5D,0x20,0x20,0x0B};
View Full Code Here

public class OsmAndProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        OsmAndProtocolDecoder decoder = new OsmAndProtocolDecoder(new TestDataManager(), null, null);
       
        verify(decoder.decode(null, null, new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET,
                "/?lat=49.60688&lon=6.15788&timestamp=2014-06-04+09%3A10%3A11&altitude=384.7&speed=0.0&id=353861053849681")));
       
        verify(decoder.decode(null, null, new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET,
View Full Code Here

public class Tr20ProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        assertNull(decoder.decode(null, null, "%%TRACKPRO01,1"));

        verify(decoder.decode(null, null,
                "%%TR-10,A,050916070549,N2240.8887E11359.2994,0,000,NA,D3800000,150,CFG:resend|"));
View Full Code Here

public class NavisProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        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[] buf2 = {0x40,0x4E,0x54,0x43,0x01,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x5A,0x00,0x50,0x69,0x2A,0x3E,0x41,0x01,0x25,(byte)0xDB,0x0E,0x00,0x00,0x00,0x15,0x11,0x07,0x07,0x11,0x0A,0x0C,0x08,(byte)0x80,0x63,0x00,0x00,(byte)0xAA,0x39,(byte)0xA2,0x38,0x16,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x11,0x07,0x08,0x11,0x0A,0x0C,(byte)0xB3,(byte)0x89,(byte)0x79,0x3F,0x1A,(byte)0xEF,0x26,0x3F,0x00,0x00,0x00,0x00,0x12,0x00,0x34,(byte)0xF5,0x16,0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,(byte)0xFA,(byte)0xFF,0x00,0x00,0x00,(byte)0xFA,(byte)0xFF,0x00,0x00,0x00,(byte)0xFA,(byte)0xFF,(byte)0x80,(byte)0x80,(byte)0x80,(byte)0x80};
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.