From 360940ff6a048a22c61f1d0c3480e9900c15ee58 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 9 Jul 2017 19:25:58 +1200 Subject: Implement GalileoSky protocol commands --- .../protocol/GalileoProtocolEncoderTest.java | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 test/org/traccar/protocol/GalileoProtocolEncoderTest.java (limited to 'test') diff --git a/test/org/traccar/protocol/GalileoProtocolEncoderTest.java b/test/org/traccar/protocol/GalileoProtocolEncoderTest.java new file mode 100644 index 000000000..34423578d --- /dev/null +++ b/test/org/traccar/protocol/GalileoProtocolEncoderTest.java @@ -0,0 +1,23 @@ +package org.traccar.protocol; + +import org.junit.Test; +import org.traccar.ProtocolTest; +import org.traccar.model.Command; + +public class GalileoProtocolEncoderTest extends ProtocolTest { + + @Test + public void testEncode() throws Exception { + + GalileoProtocolEncoder encoder = new GalileoProtocolEncoder(); + + Command command = new Command(); + command.setDeviceId(1); + command.setType(Command.TYPE_CUSTOM); + command.set(Command.KEY_DATA, "status"); + + verifyCommand(encoder, command, binary("01200003313233343536373839303132333435040000e000000000e1067374617475731f64")); + + } + +} -- cgit v1.2.3