aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/traccar/handler
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-03-06 10:56:23 -0800
committerAnton Tananaev <anton@traccar.org>2023-03-06 10:56:23 -0800
commit5505721ed5327eb65cfbbf64ad95bc956d588ba4 (patch)
tree60efdb732849e2f798f0cbc90290f6e227dbfa80 /src/test/java/org/traccar/handler
parent240fa0061368d27d950443ebf571aa2b6bf9dae3 (diff)
downloadtrackermap-server-5505721ed5327eb65cfbbf64ad95bc956d588ba4.tar.gz
trackermap-server-5505721ed5327eb65cfbbf64ad95bc956d588ba4.tar.bz2
trackermap-server-5505721ed5327eb65cfbbf64ad95bc956d588ba4.zip
Upgrade junit framework
Diffstat (limited to 'src/test/java/org/traccar/handler')
-rw-r--r--src/test/java/org/traccar/handler/ComputedAttributesTest.java4
-rw-r--r--src/test/java/org/traccar/handler/DistanceHandlerTest.java4
-rw-r--r--src/test/java/org/traccar/handler/FilterHandlerTest.java12
-rw-r--r--src/test/java/org/traccar/handler/MotionHandlerTest.java4
-rw-r--r--src/test/java/org/traccar/handler/events/AlertEventHandlerTest.java6
-rw-r--r--src/test/java/org/traccar/handler/events/CommandResultEventHandlerTest.java6
-rw-r--r--src/test/java/org/traccar/handler/events/IgnitionEventHandlerTest.java4
-rw-r--r--src/test/java/org/traccar/handler/events/MaintenanceEventHandlerTest.java4
-rw-r--r--src/test/java/org/traccar/handler/events/MotionEventHandlerTest.java6
-rw-r--r--src/test/java/org/traccar/handler/events/OverspeedEventHandlerTest.java8
10 files changed, 29 insertions, 29 deletions
diff --git a/src/test/java/org/traccar/handler/ComputedAttributesTest.java b/src/test/java/org/traccar/handler/ComputedAttributesTest.java
index 0beef9c57..e2af703c2 100644
--- a/src/test/java/org/traccar/handler/ComputedAttributesTest.java
+++ b/src/test/java/org/traccar/handler/ComputedAttributesTest.java
@@ -1,13 +1,13 @@
package org.traccar.handler;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.traccar.config.Config;
import org.traccar.model.Attribute;
import org.traccar.model.Position;
import java.util.Date;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
public class ComputedAttributesTest {
diff --git a/src/test/java/org/traccar/handler/DistanceHandlerTest.java b/src/test/java/org/traccar/handler/DistanceHandlerTest.java
index a18b14edd..7d2f1e2e3 100644
--- a/src/test/java/org/traccar/handler/DistanceHandlerTest.java
+++ b/src/test/java/org/traccar/handler/DistanceHandlerTest.java
@@ -1,11 +1,11 @@
package org.traccar.handler;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.traccar.config.Config;
import org.traccar.model.Position;
import org.traccar.session.cache.CacheManager;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.Mockito.mock;
public class DistanceHandlerTest {
diff --git a/src/test/java/org/traccar/handler/FilterHandlerTest.java b/src/test/java/org/traccar/handler/FilterHandlerTest.java
index a1102da88..9cb4a3bf2 100644
--- a/src/test/java/org/traccar/handler/FilterHandlerTest.java
+++ b/src/test/java/org/traccar/handler/FilterHandlerTest.java
@@ -1,7 +1,7 @@
package org.traccar.handler;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.traccar.BaseTest;
import org.traccar.config.Config;
import org.traccar.config.Keys;
@@ -11,8 +11,8 @@ import org.traccar.session.cache.CacheManager;
import java.util.Date;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.Mockito.mock;
@@ -23,7 +23,7 @@ public class FilterHandlerTest extends BaseTest {
private FilterHandler passingHandler;
private FilterHandler filteringHandler;
- @Before
+ @BeforeEach
public void passingHandler() {
var config = mock(Config.class);
when(config.getBoolean(Keys.FILTER_ENABLE)).thenReturn(true);
@@ -32,7 +32,7 @@ public class FilterHandlerTest extends BaseTest {
passingHandler = new FilterHandler(config, cacheManager, null);
}
- @Before
+ @BeforeEach
public void filteringHandler() {
var config = mock(Config.class);
when(config.getBoolean(Keys.FILTER_ENABLE)).thenReturn(true);
diff --git a/src/test/java/org/traccar/handler/MotionHandlerTest.java b/src/test/java/org/traccar/handler/MotionHandlerTest.java
index 93fd16206..2a7af23ba 100644
--- a/src/test/java/org/traccar/handler/MotionHandlerTest.java
+++ b/src/test/java/org/traccar/handler/MotionHandlerTest.java
@@ -1,10 +1,10 @@
package org.traccar.handler;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.traccar.model.Position;
import org.traccar.reports.common.TripsConfig;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
diff --git a/src/test/java/org/traccar/handler/events/AlertEventHandlerTest.java b/src/test/java/org/traccar/handler/events/AlertEventHandlerTest.java
index 550a93da3..66dc55c85 100644
--- a/src/test/java/org/traccar/handler/events/AlertEventHandlerTest.java
+++ b/src/test/java/org/traccar/handler/events/AlertEventHandlerTest.java
@@ -1,6 +1,6 @@
package org.traccar.handler.events;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.traccar.BaseTest;
import org.traccar.config.Config;
import org.traccar.model.Event;
@@ -9,8 +9,8 @@ import org.traccar.session.cache.CacheManager;
import java.util.Map;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.mockito.Mockito.mock;
public class AlertEventHandlerTest extends BaseTest {
diff --git a/src/test/java/org/traccar/handler/events/CommandResultEventHandlerTest.java b/src/test/java/org/traccar/handler/events/CommandResultEventHandlerTest.java
index 4997a0e0f..bc24e42f5 100644
--- a/src/test/java/org/traccar/handler/events/CommandResultEventHandlerTest.java
+++ b/src/test/java/org/traccar/handler/events/CommandResultEventHandlerTest.java
@@ -1,14 +1,14 @@
package org.traccar.handler.events;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.traccar.BaseTest;
import org.traccar.model.Event;
import org.traccar.model.Position;
import java.util.Map;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
public class CommandResultEventHandlerTest extends BaseTest {
diff --git a/src/test/java/org/traccar/handler/events/IgnitionEventHandlerTest.java b/src/test/java/org/traccar/handler/events/IgnitionEventHandlerTest.java
index 84898bea0..972932df4 100644
--- a/src/test/java/org/traccar/handler/events/IgnitionEventHandlerTest.java
+++ b/src/test/java/org/traccar/handler/events/IgnitionEventHandlerTest.java
@@ -1,6 +1,6 @@
package org.traccar.handler.events;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.traccar.BaseTest;
import org.traccar.model.Event;
import org.traccar.model.Position;
@@ -8,7 +8,7 @@ import org.traccar.session.cache.CacheManager;
import java.util.Map;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
import static org.mockito.Mockito.mock;
public class IgnitionEventHandlerTest extends BaseTest {
diff --git a/src/test/java/org/traccar/handler/events/MaintenanceEventHandlerTest.java b/src/test/java/org/traccar/handler/events/MaintenanceEventHandlerTest.java
index aa2d0bbe3..5320be926 100644
--- a/src/test/java/org/traccar/handler/events/MaintenanceEventHandlerTest.java
+++ b/src/test/java/org/traccar/handler/events/MaintenanceEventHandlerTest.java
@@ -1,6 +1,6 @@
package org.traccar.handler.events;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.traccar.BaseTest;
import org.traccar.model.Maintenance;
import org.traccar.model.Position;
@@ -9,7 +9,7 @@ import org.traccar.session.cache.CacheManager;
import java.util.Arrays;
import java.util.Date;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.mockito.ArgumentMatchers.eq;
diff --git a/src/test/java/org/traccar/handler/events/MotionEventHandlerTest.java b/src/test/java/org/traccar/handler/events/MotionEventHandlerTest.java
index b77676dc8..f2d858656 100644
--- a/src/test/java/org/traccar/handler/events/MotionEventHandlerTest.java
+++ b/src/test/java/org/traccar/handler/events/MotionEventHandlerTest.java
@@ -1,6 +1,6 @@
package org.traccar.handler.events;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.traccar.BaseTest;
import org.traccar.model.Event;
import org.traccar.model.Position;
@@ -13,8 +13,8 @@ import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.TimeZone;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
public class MotionEventHandlerTest extends BaseTest {
diff --git a/src/test/java/org/traccar/handler/events/OverspeedEventHandlerTest.java b/src/test/java/org/traccar/handler/events/OverspeedEventHandlerTest.java
index ee18ee052..25e9bd265 100644
--- a/src/test/java/org/traccar/handler/events/OverspeedEventHandlerTest.java
+++ b/src/test/java/org/traccar/handler/events/OverspeedEventHandlerTest.java
@@ -1,6 +1,6 @@
package org.traccar.handler.events;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.traccar.BaseTest;
import org.traccar.model.Event;
import org.traccar.model.Position;
@@ -12,9 +12,9 @@ import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.TimeZone;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
public class OverspeedEventHandlerTest extends BaseTest {