aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org')
-rw-r--r--src/test/java/org/traccar/handler/DistanceHandlerTest.java4
-rw-r--r--src/test/java/org/traccar/handler/events/AlertEventHandlerTest.java4
-rw-r--r--src/test/java/org/traccar/handler/events/IgnitionEventHandlerTest.java4
3 files changed, 7 insertions, 5 deletions
diff --git a/src/test/java/org/traccar/handler/DistanceHandlerTest.java b/src/test/java/org/traccar/handler/DistanceHandlerTest.java
index f7c6e42cd..a18b14edd 100644
--- a/src/test/java/org/traccar/handler/DistanceHandlerTest.java
+++ b/src/test/java/org/traccar/handler/DistanceHandlerTest.java
@@ -3,15 +3,17 @@ package org.traccar.handler;
import org.junit.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.mockito.Mockito.mock;
public class DistanceHandlerTest {
@Test
public void testCalculateDistance() {
- DistanceHandler distanceHandler = new DistanceHandler(new Config(), null);
+ DistanceHandler distanceHandler = new DistanceHandler(new Config(), mock(CacheManager.class));
Position position = distanceHandler.handlePosition(new Position());
diff --git a/src/test/java/org/traccar/handler/events/AlertEventHandlerTest.java b/src/test/java/org/traccar/handler/events/AlertEventHandlerTest.java
index d6cf32ca3..550a93da3 100644
--- a/src/test/java/org/traccar/handler/events/AlertEventHandlerTest.java
+++ b/src/test/java/org/traccar/handler/events/AlertEventHandlerTest.java
@@ -3,9 +3,9 @@ package org.traccar.handler.events;
import org.junit.Test;
import org.traccar.BaseTest;
import org.traccar.config.Config;
-import org.traccar.database.IdentityManager;
import org.traccar.model.Event;
import org.traccar.model.Position;
+import org.traccar.session.cache.CacheManager;
import java.util.Map;
@@ -18,7 +18,7 @@ public class AlertEventHandlerTest extends BaseTest {
@Test
public void testAlertEventHandler() {
- AlertEventHandler alertEventHandler = new AlertEventHandler(new Config(), mock(IdentityManager.class));
+ AlertEventHandler alertEventHandler = new AlertEventHandler(new Config(), mock(CacheManager.class));
Position position = new Position();
position.set(Position.KEY_ALARM, Position.ALARM_GENERAL);
diff --git a/src/test/java/org/traccar/handler/events/IgnitionEventHandlerTest.java b/src/test/java/org/traccar/handler/events/IgnitionEventHandlerTest.java
index 0de80dd70..84898bea0 100644
--- a/src/test/java/org/traccar/handler/events/IgnitionEventHandlerTest.java
+++ b/src/test/java/org/traccar/handler/events/IgnitionEventHandlerTest.java
@@ -2,9 +2,9 @@ package org.traccar.handler.events;
import org.junit.Test;
import org.traccar.BaseTest;
-import org.traccar.database.IdentityManager;
import org.traccar.model.Event;
import org.traccar.model.Position;
+import org.traccar.session.cache.CacheManager;
import java.util.Map;
@@ -16,7 +16,7 @@ public class IgnitionEventHandlerTest extends BaseTest {
@Test
public void testIgnitionEventHandler() {
- IgnitionEventHandler ignitionEventHandler = new IgnitionEventHandler(mock(IdentityManager.class));
+ IgnitionEventHandler ignitionEventHandler = new IgnitionEventHandler(mock(CacheManager.class));
Position position = new Position();
position.set(Position.KEY_IGNITION, true);