aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol
diff options
context:
space:
mode:
authorparveenkumaryadav <parveenkumardeeva@gmail.com>2018-04-13 10:59:55 +0530
committerparveenkumaryadav <parveenkumardeeva@gmail.com>2018-04-13 10:59:55 +0530
commit1313ec644a58c3988528a27491c16602094286bf (patch)
treebafa77d01a6f6e3768994448ce533e8a2328ac16 /test/org/traccar/protocol
parentd448823edd0e8a7833c79b980cfe9778b849843a (diff)
downloadtraccar-server-1313ec644a58c3988528a27491c16602094286bf.tar.gz
traccar-server-1313ec644a58c3988528a27491c16602094286bf.tar.bz2
traccar-server-1313ec644a58c3988528a27491c16602094286bf.zip
Tk103 Output Control command support added
Diffstat (limited to 'test/org/traccar/protocol')
-rw-r--r--test/org/traccar/protocol/Tk103ProtocolEncoderTest.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/Tk103ProtocolEncoderTest.java b/test/org/traccar/protocol/Tk103ProtocolEncoderTest.java
index 565f6bb88..f0a21334e 100644
--- a/test/org/traccar/protocol/Tk103ProtocolEncoderTest.java
+++ b/test/org/traccar/protocol/Tk103ProtocolEncoderTest.java
@@ -9,6 +9,21 @@ import static org.junit.Assert.assertEquals;
public class Tk103ProtocolEncoderTest extends ProtocolTest {
@Test
+ public void testEncodeOutputControl() {
+
+ Tk103ProtocolEncoder encoder = new Tk103ProtocolEncoder();
+
+ Command command = new Command();
+ command.setDeviceId(1);
+ command.setType(Command.TYPE_OUTPUT_CONTROL);
+ command.set(Command.KEY_INDEX, 0);
+ command.set(Command.KEY_DATA, "1");
+
+ assertEquals("(123456789012345AV001)", encoder.encodeCommand(command));
+
+ }
+
+ @Test
public void testEncodeEngineStop() throws Exception {
Tk103ProtocolEncoder encoder = new Tk103ProtocolEncoder();