Package org.traccar.helper

Examples of org.traccar.helper.TestDataManager


public class EasyTrackProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        assertNull(decoder.decode(null, null, "*ET,135790246811221,GZ,0001,0005"));

        verify(decoder.decode(null, null,
                "*ET,135790246811221,DW,A,0A090D,101C0D,00CF27C6,0413FA4E,0000,0000,00000000,20,4,0000,00F123"));
 
View Full Code Here


public class Stl060ProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        verify(decoder.decode(null, null,
                "$1,357804048043099,D001,AP29AW0963,23/02/14,14:06:54,17248488N,078342226E,0.08,193.12,1,1,1,1,1,A"));
       
        verify(decoder.decode(null, null,
View Full Code Here

public class TotemProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        assertNull(decoder.decode(null, null,
                "$$BB862170017856731|AA$GPRMC,000000.00,V,0000.0000,N,00000.0000,E,000.0,000.0,000000,,,A*73|00.0|00.0|00.0|000000001000|20000000000000|13790000|00000000|00000000|00000000|0.0000|0007|8C23"));

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

public class Gt02ProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        Gt02ProtocolDecoder decoder = new Gt02ProtocolDecoder(new TestDataManager(), null, null);
       
        verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
                new int[] {0x68,0x68,0x25,0x00,0x00,0x01,0x23,0x45,0x67,0x89,0x01,0x23,0x45,0x00,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x02,0x6B,0x3F,0x3E,0x02,0x6B,0x3F,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0D,0x0A}))));
       
        assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
View Full Code Here

public class MeitrackProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        MeitrackProtocolDecoder decoder = new MeitrackProtocolDecoder(new TestDataManager(), null, null);
       
        verify(decoder.decode(null, null, ChannelBuffers.copiedBuffer(
                "$$X138,862170010187175,AAA,35,-29.960365,-51.655455,130507201625,A,8,9,0,107,0.9,7,169322,126582,724|6|0547|132B,0000,0009|000A||0278|0000,*BE", Charset.defaultCharset())));
       
        verify(decoder.decode(null, null, ChannelBuffers.copiedBuffer(
View Full Code Here

public class VisiontekProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        verify(decoder.decode(null, null,
                "$1,AP09BU9397,861785006462448,20,06,14,15,03,28,17267339N,078279407E,060.0,073,0550,11,0,1,0,0,1,1,26,A,0000000000"));

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

public class Xexun2ProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        Xexun2ProtocolDecoder decoder = new Xexun2ProtocolDecoder(new TestDataManager(), null, null);
       
        assertNull(decoder.decode(null, null,
                ",+48606717068,,L,, imei:012207005047292,,,F:4.28V,1,52,11565,247,01,000E,1FC5"));

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

public class YwtProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        YwtProtocolDecoder decoder = new YwtProtocolDecoder(new TestDataManager(), null, null);
       
        assertNull(decoder.decode(null, null,
                "%SN,0417061042:0,0,140117041203,404"));

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

public class V680ProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

        V680ProtocolDecoder decoder = new V680ProtocolDecoder(new TestDataManager(), null, null);
       
        assertNull(decoder.decode(null, null,
                "#353588102019155"));
       
        verify(decoder.decode(null, null,
View Full Code Here

public class NoranProtocolDecoderTest {

    @Test
    public void testDecode() throws Exception {

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

        int[] buf1 = {0x0f,0x00,0x00,0x00,0x4e,0x52,0x30,0x39,0x46,0x30,0x34,0x31,0x35,0x35,0x00};
        assertNull(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertArray(buf1))));
       
        int[] buf2 = {0x22,0x00,0x08,0x00,0x01,0x0c,0x00,0x8a,0x00,0x7e,0x9d,0xaa,0x42,0x31,0x7b,0xdd,0x41,0xa7,0xf3,0xe2,0x38,0x4e,0x52,0x30,0x39,0x46,0x30,0x34,0x31,0x35,0x35,0x00,0x00,0x00};
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.