aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-10-28 21:05:56 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-10-28 21:05:56 +1300
commit9bc7deb97f2751ee0fd7e5ba198d2c030d149e01 (patch)
tree75acd9fe2aa773d1b802cfe7d42e200d4e5eddac /test/org/traccar/protocol
parent7ee3f22184bfe4ed61f6a0eaf2f52116ac02b2ee (diff)
downloadtraccar-server-9bc7deb97f2751ee0fd7e5ba198d2c030d149e01.tar.gz
traccar-server-9bc7deb97f2751ee0fd7e5ba198d2c030d149e01.tar.bz2
traccar-server-9bc7deb97f2751ee0fd7e5ba198d2c030d149e01.zip
Extend Bofan PT600 support
Diffstat (limited to 'test/org/traccar/protocol')
-rw-r--r--test/org/traccar/protocol/Pt502ProtocolEncoderTest.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/Pt502ProtocolEncoderTest.java b/test/org/traccar/protocol/Pt502ProtocolEncoderTest.java
index 62406d3f2..39ca2fe65 100644
--- a/test/org/traccar/protocol/Pt502ProtocolEncoderTest.java
+++ b/test/org/traccar/protocol/Pt502ProtocolEncoderTest.java
@@ -8,6 +8,20 @@ import org.traccar.model.Command;
public class Pt502ProtocolEncoderTest extends ProtocolTest {
@Test
+ public void testEncodeCustom() throws Exception {
+
+ Pt502ProtocolEncoder encoder = new Pt502ProtocolEncoder();
+
+ Command command = new Command();
+ command.setDeviceId(1);
+ command.setType(Command.TYPE_CUSTOM);
+ command.set(Command.KEY_DATA, "#PTI300");
+
+ Assert.assertEquals("#PTI300\r\n", encoder.encodeCommand(command));
+
+ }
+
+ @Test
public void testEncodeOutputControl() throws Exception {
Pt502ProtocolEncoder encoder = new Pt502ProtocolEncoder();