aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/traccar/protocol/Tk103ProtocolEncoderTest.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-05-30 14:48:42 -0700
committerAnton Tananaev <anton@traccar.org>2022-05-30 14:48:42 -0700
commit0202dbf7258df8cbe8168ddc985e774b1cadf964 (patch)
tree4828e614e29715e6bdfd10c5db86b52e43229ab3 /src/test/java/org/traccar/protocol/Tk103ProtocolEncoderTest.java
parent014cf82a9e63a36e944e293932f9edf27e452919 (diff)
downloadtrackermap-server-0202dbf7258df8cbe8168ddc985e774b1cadf964.tar.gz
trackermap-server-0202dbf7258df8cbe8168ddc985e774b1cadf964.tar.bz2
trackermap-server-0202dbf7258df8cbe8168ddc985e774b1cadf964.zip
Decouple more tests from context
Diffstat (limited to 'src/test/java/org/traccar/protocol/Tk103ProtocolEncoderTest.java')
-rw-r--r--src/test/java/org/traccar/protocol/Tk103ProtocolEncoderTest.java80
1 files changed, 40 insertions, 40 deletions
diff --git a/src/test/java/org/traccar/protocol/Tk103ProtocolEncoderTest.java b/src/test/java/org/traccar/protocol/Tk103ProtocolEncoderTest.java
index d507f3c4f..359e432c7 100644
--- a/src/test/java/org/traccar/protocol/Tk103ProtocolEncoderTest.java
+++ b/src/test/java/org/traccar/protocol/Tk103ProtocolEncoderTest.java
@@ -9,9 +9,9 @@ import static org.junit.Assert.assertEquals;
public class Tk103ProtocolEncoderTest extends ProtocolTest {
@Test
- public void testEncodeOutputControl() {
+ public void testEncodeOutputControl() throws Exception {
- var encoder = new Tk103ProtocolEncoder(null);
+ var encoder = inject(new Tk103ProtocolEncoder(null));
Command command = new Command();
command.setDeviceId(1);
@@ -23,9 +23,9 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest {
}
@Test
- public void testEncodeEngineStop() {
+ public void testEncodeEngineStop() throws Exception {
- var encoder = new Tk103ProtocolEncoder(null);
+ var encoder = inject(new Tk103ProtocolEncoder(null));
Command command = new Command();
command.setDeviceId(1);
@@ -36,9 +36,9 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest {
}
@Test
- public void testEncodePositionSingle() {
+ public void testEncodePositionSingle() throws Exception {
- var encoder = new Tk103ProtocolEncoder(null);
+ var encoder = inject(new Tk103ProtocolEncoder(null));
Command command = new Command();
command.setDeviceId(1);
@@ -49,9 +49,9 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest {
}
@Test
- public void testEncodePositionPeriodic() {
+ public void testEncodePositionPeriodic() throws Exception {
- var encoder = new Tk103ProtocolEncoder(null);
+ var encoder = inject(new Tk103ProtocolEncoder(null));
Command command = new Command();
command.setDeviceId(1);
@@ -63,9 +63,9 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest {
}
@Test
- public void testEncodePositionStop() {
+ public void testEncodePositionStop() throws Exception {
- var encoder = new Tk103ProtocolEncoder(null);
+ var encoder = inject(new Tk103ProtocolEncoder(null));
Command command = new Command();
command.setDeviceId(1);
@@ -76,9 +76,9 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest {
}
@Test
- public void testEncodeGetVersion() {
+ public void testEncodeGetVersion() throws Exception {
- var encoder = new Tk103ProtocolEncoder(null);
+ var encoder = inject(new Tk103ProtocolEncoder(null));
Command command = new Command();
command.setDeviceId(1);
@@ -89,9 +89,9 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest {
}
@Test
- public void testEncodeRebootDevice() {
+ public void testEncodeRebootDevice() throws Exception {
- var encoder = new Tk103ProtocolEncoder(null);
+ var encoder = inject(new Tk103ProtocolEncoder(null));
Command command = new Command();
command.setDeviceId(1);
@@ -102,9 +102,9 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest {
}
@Test
- public void testEncodeSetOdometer() {
+ public void testEncodeSetOdometer() throws Exception {
- var encoder = new Tk103ProtocolEncoder(null);
+ var encoder = inject(new Tk103ProtocolEncoder(null));
Command command = new Command();
command.setDeviceId(1);
@@ -115,9 +115,9 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest {
}
@Test
- public void testEncodePositionSingleAlternative() {
+ public void testEncodePositionSingleAlternative() throws Exception {
- var encoder = new Tk103ProtocolEncoder(null, true);
+ var encoder = inject(new Tk103ProtocolEncoder(null, true));
Command command = new Command();
command.setDeviceId(1);
@@ -128,9 +128,9 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest {
}
@Test
- public void testEncodePositionPeriodicAlternative() {
+ public void testEncodePositionPeriodicAlternative() throws Exception {
- var encoder = new Tk103ProtocolEncoder(null, true);
+ var encoder = inject(new Tk103ProtocolEncoder(null, true));
Command command = new Command();
command.setDeviceId(1);
@@ -141,9 +141,9 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest {
}
@Test
- public void testEncodePositionStopAlternative() {
+ public void testEncodePositionStopAlternative() throws Exception {
- var encoder = new Tk103ProtocolEncoder(null, true);
+ var encoder = inject(new Tk103ProtocolEncoder(null, true));
Command command = new Command();
command.setDeviceId(1);
@@ -154,9 +154,9 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest {
}
@Test
- public void testEncodeGetVersionAlternative() {
+ public void testEncodeGetVersionAlternative() throws Exception {
- var encoder = new Tk103ProtocolEncoder(null, true);
+ var encoder = inject(new Tk103ProtocolEncoder(null, true));
Command command = new Command();
command.setDeviceId(1);
@@ -167,9 +167,9 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest {
}
@Test
- public void testEncodeRebootDeviceAlternative() {
+ public void testEncodeRebootDeviceAlternative() throws Exception {
- var encoder = new Tk103ProtocolEncoder(null, true);
+ var encoder = inject(new Tk103ProtocolEncoder(null, true));
Command command = new Command();
command.setDeviceId(1);
@@ -180,9 +180,9 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest {
}
@Test
- public void testEncodeIdentificationAlternative() {
+ public void testEncodeIdentificationAlternative() throws Exception {
- var encoder = new Tk103ProtocolEncoder(null, true);
+ var encoder = inject(new Tk103ProtocolEncoder(null, true));
Command command = new Command();
command.setDeviceId(1);
@@ -193,9 +193,9 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest {
}
@Test
- public void testEncodeSosOnAlternative() {
+ public void testEncodeSosOnAlternative() throws Exception {
- var encoder = new Tk103ProtocolEncoder(null, true);
+ var encoder = inject(new Tk103ProtocolEncoder(null, true));
Command command = new Command();
command.setDeviceId(1);
@@ -207,9 +207,9 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest {
}
@Test
- public void testEncodeSosOffAlternative() {
+ public void testEncodeSosOffAlternative() throws Exception {
- var encoder = new Tk103ProtocolEncoder(null, true);
+ var encoder = inject(new Tk103ProtocolEncoder(null, true));
Command command = new Command();
command.setDeviceId(1);
@@ -221,9 +221,9 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest {
}
@Test
- public void testEncodeCustom() {
+ public void testEncodeCustom() throws Exception {
- var encoder = new Tk103ProtocolEncoder(null);
+ var encoder = inject(new Tk103ProtocolEncoder(null));
Command command = new Command();
command.setDeviceId(1);
@@ -235,9 +235,9 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest {
}
@Test
- public void testEncodeCustomAlternative() {
+ public void testEncodeCustomAlternative() throws Exception {
- var encoder = new Tk103ProtocolEncoder(null, true);
+ var encoder = inject(new Tk103ProtocolEncoder(null, true));
Command command = new Command();
command.setDeviceId(1);
@@ -249,9 +249,9 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest {
}
@Test
- public void testEncodeSetConnectionAlternative() {
+ public void testEncodeSetConnectionAlternative() throws Exception {
- var encoder = new Tk103ProtocolEncoder(null, true);
+ var encoder = inject(new Tk103ProtocolEncoder(null, true));
Command command = new Command();
command.setDeviceId(1);
@@ -264,9 +264,9 @@ public class Tk103ProtocolEncoderTest extends ProtocolTest {
}
@Test
- public void testEncodeSosNumberAlternative() {
+ public void testEncodeSosNumberAlternative() throws Exception {
- var encoder = new Tk103ProtocolEncoder(null, true);
+ var encoder = inject(new Tk103ProtocolEncoder(null, true));
Command command = new Command();
command.setDeviceId(1);