diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-04-14 19:17:24 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-14 19:17:24 +1200 |
commit | 994efc29d550e3f4a69f65ee60aa51816f352d45 (patch) | |
tree | adf94921fedc0daf9cd7f3d3f5fafd3f796b35cd /test/org/traccar | |
parent | becfb50e86d90c57ab9549d728add83b8df9fd75 (diff) | |
parent | cc835f74f47a7f1e4f052d1f7ed77965cf1be133 (diff) | |
download | trackermap-server-994efc29d550e3f4a69f65ee60aa51816f352d45.tar.gz trackermap-server-994efc29d550e3f4a69f65ee60aa51816f352d45.tar.bz2 trackermap-server-994efc29d550e3f4a69f65ee60aa51816f352d45.zip |
Merge pull request #3844 from parveenkumardeeva/TK103-Control_Output
Tk103 control output
Diffstat (limited to 'test/org/traccar')
-rw-r--r-- | test/org/traccar/protocol/Tk103ProtocolEncoderTest.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/Tk103ProtocolEncoderTest.java b/test/org/traccar/protocol/Tk103ProtocolEncoderTest.java index 565f6bb88..25968a0fe 100644 --- a/test/org/traccar/protocol/Tk103ProtocolEncoderTest.java +++ b/test/org/traccar/protocol/Tk103ProtocolEncoderTest.java @@ -9,6 +9,20 @@ 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_DATA, "1"); + + assertEquals("(123456789012345AV001)", encoder.encodeCommand(command)); + + } + + @Test public void testEncodeEngineStop() throws Exception { Tk103ProtocolEncoder encoder = new Tk103ProtocolEncoder(); |