aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar
diff options
context:
space:
mode:
authorValerii Vyshniak <valeravi@vi-soft.com.ua>2017-11-18 00:56:52 +0100
committerValerii Vyshniak <valeravi@vi-soft.com.ua>2017-11-18 18:53:07 +0100
commit3ac49cd8e224887e9a5f8b7a1787183fbdb0e73f (patch)
tree7e44c0530626365c93760e2d0cce8ce87def8685 /test/org/traccar
parentd252d135ebefc060861467f67dcb0e19ba9ce606 (diff)
downloadtrackermap-server-3ac49cd8e224887e9a5f8b7a1787183fbdb0e73f.tar.gz
trackermap-server-3ac49cd8e224887e9a5f8b7a1787183fbdb0e73f.tar.bz2
trackermap-server-3ac49cd8e224887e9a5f8b7a1787183fbdb0e73f.zip
T580W: Commands
Diffstat (limited to 'test/org/traccar')
-rw-r--r--test/org/traccar/protocol/Tk103ProtocolEncoderTest.java52
1 files changed, 52 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/Tk103ProtocolEncoderTest.java b/test/org/traccar/protocol/Tk103ProtocolEncoderTest.java
index afc3b2387..8439f8d48 100644
--- a/test/org/traccar/protocol/Tk103ProtocolEncoderTest.java
+++ b/test/org/traccar/protocol/Tk103ProtocolEncoderTest.java
@@ -99,4 +99,56 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest {
}
+ @Test
+ public void testEncodeT580WRebootDevice() throws Exception {
+
+ Tk103ProtocolEncoder encoder = new Tk103ProtocolEncoder();
+
+ Command command = new Command();
+ command.setDeviceId(1);
+ command.setType("T580W_rebootDevice");
+
+ Assert.assertEquals("[begin]sms2,88888888,[end]", encoder.encodeCommand(command));
+
+ }
+
+ @Test
+ public void testEncodeT580WSosOn() throws Exception {
+
+ Tk103ProtocolEncoder encoder = new Tk103ProtocolEncoder();
+
+ Command command = new Command();
+ command.setDeviceId(1);
+ command.setType("T580W_alarmSosOn");
+
+ Assert.assertEquals("[begin]sms2,*soson*,[end]", encoder.encodeCommand(command));
+
+ }
+
+ @Test
+ public void testEncodeT580WSosOff() throws Exception {
+
+ Tk103ProtocolEncoder encoder = new Tk103ProtocolEncoder();
+
+ Command command = new Command();
+ command.setDeviceId(1);
+ command.setType("T580W_alarmSosOff");
+
+ Assert.assertEquals("[begin]sms2,*sosoff*,[end]", encoder.encodeCommand(command));
+
+ }
+
+ @Test
+ public void testEncodeT580WRouteTrack() throws Exception {
+
+ Tk103ProtocolEncoder encoder = new Tk103ProtocolEncoder();
+
+ Command command = new Command();
+ command.setDeviceId(1);
+ command.setType("T580W_positionRealtime");
+
+ Assert.assertEquals("[begin]sms2,*routetrack*99*,[end]", encoder.encodeCommand(command));
+
+ }
+
}