diff options
author | Anton Tananaev <anton@traccar.org> | 2022-06-18 11:08:32 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-06-18 11:08:32 -0700 |
commit | ddbe4d7de6ae7590e2b927066312597efa129393 (patch) | |
tree | 777882e24ce5488b4cfc8a4d6f11119abcbeb7a3 /src/test/java/org | |
parent | 182656b6dc1fb5d167bb752c16ecf633add001a8 (diff) | |
download | trackermap-server-ddbe4d7de6ae7590e2b927066312597efa129393.tar.gz trackermap-server-ddbe4d7de6ae7590e2b927066312597efa129393.tar.bz2 trackermap-server-ddbe4d7de6ae7590e2b927066312597efa129393.zip |
Remove positions from manager
Diffstat (limited to 'src/test/java/org')
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); |