From de56187c1a48b3c4388ff986bd318d4683f2a344 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 7 May 2016 16:44:27 +1200 Subject: Implement general custom commands --- .../protocol/MiniFinderProtocolEncoderTest.java | 36 ---------------------- 1 file changed, 36 deletions(-) delete mode 100644 test/org/traccar/protocol/MiniFinderProtocolEncoderTest.java (limited to 'test/org/traccar/protocol/MiniFinderProtocolEncoderTest.java') 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; - } - -} -- cgit v1.2.3