diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-01-25 20:14:42 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-01-26 08:41:45 +1300 |
commit | 87bdccbe9843e38174ad345b8e474b1cded9f985 (patch) | |
tree | 4b2f90ad2b9a5d32410ab9579fb4135b5ac95bfa /test/org/traccar/protocol/Tk103ProtocolEncoderTest.java | |
parent | 8535983fea8c09046c53f2ebf388bbf3fae594ce (diff) | |
download | trackermap-server-87bdccbe9843e38174ad345b8e474b1cded9f985.tar.gz trackermap-server-87bdccbe9843e38174ad345b8e474b1cded9f985.tar.bz2 trackermap-server-87bdccbe9843e38174ad345b8e474b1cded9f985.zip |
Static imports for junit
Diffstat (limited to 'test/org/traccar/protocol/Tk103ProtocolEncoderTest.java')
-rw-r--r-- | test/org/traccar/protocol/Tk103ProtocolEncoderTest.java | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/test/org/traccar/protocol/Tk103ProtocolEncoderTest.java b/test/org/traccar/protocol/Tk103ProtocolEncoderTest.java index 7e04dcb81..6b38035ed 100644 --- a/test/org/traccar/protocol/Tk103ProtocolEncoderTest.java +++ b/test/org/traccar/protocol/Tk103ProtocolEncoderTest.java @@ -7,6 +7,8 @@ import org.traccar.TestIdentityManager; import org.traccar.model.Command; import org.traccar.model.Device; +import static org.junit.Assert.assertEquals; + public class Tk103ProtocolEncoderTest extends ProtocolTest { @Test @@ -18,7 +20,7 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest { command.setDeviceId(1); command.setType(Command.TYPE_ENGINE_STOP); - Assert.assertEquals("(123456789012345AV010)", encoder.encodeCommand(command)); + assertEquals("(123456789012345AV010)", encoder.encodeCommand(command)); } @@ -31,7 +33,7 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest { command.setDeviceId(1); command.setType(Command.TYPE_POSITION_SINGLE); - Assert.assertEquals("(123456789012345AP00)", encoder.encodeCommand(command)); + assertEquals("(123456789012345AP00)", encoder.encodeCommand(command)); } @@ -45,7 +47,7 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest { command.setType(Command.TYPE_POSITION_PERIODIC); command.set(Command.KEY_FREQUENCY, 60); - Assert.assertEquals("(123456789012345AR00003C0000)", encoder.encodeCommand(command)); + assertEquals("(123456789012345AR00003C0000)", encoder.encodeCommand(command)); } @@ -58,7 +60,7 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest { command.setDeviceId(1); command.setType(Command.TYPE_POSITION_STOP); - Assert.assertEquals("(123456789012345AR0000000000)", encoder.encodeCommand(command)); + assertEquals("(123456789012345AR0000000000)", encoder.encodeCommand(command)); } @@ -71,7 +73,7 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest { command.setDeviceId(1); command.setType(Command.TYPE_GET_VERSION); - Assert.assertEquals("(123456789012345AP07)", encoder.encodeCommand(command)); + assertEquals("(123456789012345AP07)", encoder.encodeCommand(command)); } @@ -84,7 +86,7 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest { command.setDeviceId(1); command.setType(Command.TYPE_REBOOT_DEVICE); - Assert.assertEquals("(123456789012345AT00)", encoder.encodeCommand(command)); + assertEquals("(123456789012345AT00)", encoder.encodeCommand(command)); } @@ -97,7 +99,7 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest { command.setDeviceId(1); command.setType(Command.TYPE_SET_ODOMETER); - Assert.assertEquals("(123456789012345AX01)", encoder.encodeCommand(command)); + assertEquals("(123456789012345AX01)", encoder.encodeCommand(command)); } @@ -110,7 +112,7 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest { command.setDeviceId(1); command.setType(Command.TYPE_POSITION_SINGLE); - Assert.assertEquals("[begin]sms2,*getposl*,[end]", encoder.encodeCommand(command)); + assertEquals("[begin]sms2,*getposl*,[end]", encoder.encodeCommand(command)); } @@ -123,7 +125,7 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest { command.setDeviceId(1); command.setType(Command.TYPE_POSITION_PERIODIC); - Assert.assertEquals("[begin]sms2,*routetrack*99*,[end]", encoder.encodeCommand(command)); + assertEquals("[begin]sms2,*routetrack*99*,[end]", encoder.encodeCommand(command)); } @@ -136,7 +138,7 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest { command.setDeviceId(1); command.setType(Command.TYPE_POSITION_STOP); - Assert.assertEquals("[begin]sms2,*routetrackoff*,[end]", encoder.encodeCommand(command)); + assertEquals("[begin]sms2,*routetrackoff*,[end]", encoder.encodeCommand(command)); } @@ -149,7 +151,7 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest { command.setDeviceId(1); command.setType(Command.TYPE_GET_VERSION); - Assert.assertEquals("[begin]sms2,*about*,[end]", encoder.encodeCommand(command)); + assertEquals("[begin]sms2,*about*,[end]", encoder.encodeCommand(command)); } @@ -162,7 +164,7 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest { command.setDeviceId(1); command.setType(Command.TYPE_REBOOT_DEVICE); - Assert.assertEquals("[begin]sms2,88888888,[end]", encoder.encodeCommand(command)); + assertEquals("[begin]sms2,88888888,[end]", encoder.encodeCommand(command)); } @@ -175,7 +177,7 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest { command.setDeviceId(1); command.setType(Command.TYPE_IDENTIFICATION); - Assert.assertEquals("[begin]sms2,999999,[end]", encoder.encodeCommand(command)); + assertEquals("[begin]sms2,999999,[end]", encoder.encodeCommand(command)); } @@ -189,7 +191,7 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest { command.setType(Command.TYPE_ALARM_SOS); command.set(Command.KEY_ENABLE, true); - Assert.assertEquals("[begin]sms2,*soson*,[end]", encoder.encodeCommand(command)); + assertEquals("[begin]sms2,*soson*,[end]", encoder.encodeCommand(command)); } @@ -203,7 +205,7 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest { command.setType(Command.TYPE_ALARM_SOS); command.set(Command.KEY_ENABLE, false); - Assert.assertEquals("[begin]sms2,*sosoff*,[end]", encoder.encodeCommand(command)); + assertEquals("[begin]sms2,*sosoff*,[end]", encoder.encodeCommand(command)); } @@ -217,7 +219,7 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest { command.setType(Command.TYPE_CUSTOM); command.set(Command.KEY_DATA, "any text is ok"); - Assert.assertEquals("[begin]sms2,any text is ok,[end]", encoder.encodeCommand(command)); + assertEquals("[begin]sms2,any text is ok,[end]", encoder.encodeCommand(command)); } @@ -232,7 +234,7 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest { command.set(Command.KEY_SERVER, "1.2.3.4"); command.set(Command.KEY_PORT, "5555"); - Assert.assertEquals("[begin]sms2,*setip*1*2*3*4*5555*,[end]", encoder.encodeCommand(command)); + assertEquals("[begin]sms2,*setip*1*2*3*4*5555*,[end]", encoder.encodeCommand(command)); } @@ -248,7 +250,7 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest { command.set(Command.KEY_PHONE, "+55555555555"); command.set(Command.KEY_DEVICE_PASSWORD, "232323"); - Assert.assertEquals("[begin]sms2,*master*232323*+55555555555*,[end]", encoder.encodeCommand(command)); + assertEquals("[begin]sms2,*master*232323*+55555555555*,[end]", encoder.encodeCommand(command)); } |