aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/protocol/MiniFinderProtocolEncoderTest.java
diff options
context:
space:
mode:
authorHans van den Elsen <hans.elsen@esds.nl>2016-02-15 07:28:03 +0100
committerHans van den Elsen <hans.elsen@esds.nl>2016-02-15 07:28:03 +0100
commit3ced99384b1967f5cde9abdf30c1c0184a5ae3f6 (patch)
tree14f0543b9a2607be8be7f140a78ac521f8646d7e /test/org/traccar/protocol/MiniFinderProtocolEncoderTest.java
parent30d886b86bb76dc7e3a13cffb63252d31f0abe2a (diff)
downloadtrackermap-server-3ced99384b1967f5cde9abdf30c1c0184a5ae3f6.tar.gz
trackermap-server-3ced99384b1967f5cde9abdf30c1c0184a5ae3f6.tar.bz2
trackermap-server-3ced99384b1967f5cde9abdf30c1c0184a5ae3f6.zip
Polishing up the custom commands for MiniFinder
Renamed Command.CUSTOM to TYPE_CUSTOM. Put the raw command in the 'raw' attribute instead as the key for one.
Diffstat (limited to 'test/org/traccar/protocol/MiniFinderProtocolEncoderTest.java')
-rw-r--r--test/org/traccar/protocol/MiniFinderProtocolEncoderTest.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/org/traccar/protocol/MiniFinderProtocolEncoderTest.java b/test/org/traccar/protocol/MiniFinderProtocolEncoderTest.java
index 7beb52b51..524152bb8 100644
--- a/test/org/traccar/protocol/MiniFinderProtocolEncoderTest.java
+++ b/test/org/traccar/protocol/MiniFinderProtocolEncoderTest.java
@@ -1,8 +1,6 @@
package org.traccar.protocol;
-import org.junit.Assert;
import org.junit.Before;
-import org.junit.BeforeClass;
import org.junit.Test;
import org.traccar.ProtocolTest;
import org.traccar.model.Command;
@@ -21,8 +19,8 @@ public class MiniFinderProtocolEncoderTest extends ProtocolTest {
public void testEncodeCustom() throws Exception {
String expected = String.format("%sM,700", prefix);
Command command = new Command();
- command.setType(Command.CUSTOM);
- command.set(expected, 1);
+ command.setType(Command.TYPE_CUSTOM);
+ command.set("raw", expected);
Object encoded = encoder.encodeCommand(command);
assert expected.equals(encoded);
}