diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-05-07 16:44:27 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-05-07 16:44:27 +1200 |
commit | de56187c1a48b3c4388ff986bd318d4683f2a344 (patch) | |
tree | 9aada33125a5a9b5d9ab935ead33e48ee88b2c35 /test/org/traccar | |
parent | ff23b231b678536e2d395680c5f9fb0f73e2ddd8 (diff) | |
download | trackermap-server-de56187c1a48b3c4388ff986bd318d4683f2a344.tar.gz trackermap-server-de56187c1a48b3c4388ff986bd318d4683f2a344.tar.bz2 trackermap-server-de56187c1a48b3c4388ff986bd318d4683f2a344.zip |
Implement general custom commands
Diffstat (limited to 'test/org/traccar')
-rw-r--r-- | test/org/traccar/protocol/MiniFinderProtocolEncoderTest.java | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/test/org/traccar/protocol/MiniFinderProtocolEncoderTest.java b/test/org/traccar/protocol/MiniFinderProtocolEncoderTest.java deleted file mode 100644 index 524152bb8..000000000 --- a/test/org/traccar/protocol/MiniFinderProtocolEncoderTest.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.traccar.protocol; - -import org.junit.Before; -import org.junit.Test; -import org.traccar.ProtocolTest; -import org.traccar.model.Command; - -public class MiniFinderProtocolEncoderTest extends ProtocolTest { - - private String prefix = "123456"; - private MiniFinderProtocolEncoder encoder; - - @Before - public void setup() { - encoder = new MiniFinderProtocolEncoder(); - } - - @Test - public void testEncodeCustom() throws Exception { - String expected = String.format("%sM,700", prefix); - Command command = new Command(); - command.setType(Command.TYPE_CUSTOM); - command.set("raw", expected); - Object encoded = encoder.encodeCommand(command); - assert expected.equals(encoded); - } - - @Test - public void testEncodeUnsupportedCommand() throws Exception { - Command command = new Command(); - command.setType("UNSUPPORTED"); - Object o = encoder.encodeCommand(command); - assert o == null; - } - -} |