From ef644e5185b3109b0da30972a0b5c56768c69957 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 28 Jun 2022 07:44:26 -0700 Subject: Fix tests --- .../java/org/traccar/reports/ReportUtilsTest.java | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/test/java/org/traccar/reports/ReportUtilsTest.java b/src/test/java/org/traccar/reports/ReportUtilsTest.java index dfb2ef05c..b73ae7cc0 100644 --- a/src/test/java/org/traccar/reports/ReportUtilsTest.java +++ b/src/test/java/org/traccar/reports/ReportUtilsTest.java @@ -105,7 +105,7 @@ public class ReportUtilsTest extends BaseTest { mock(Config.class), storage, mock(PermissionsService.class), tripsConfig, mock(VelocityEngine.class), null); - Collection trips = reportUtils.detectTripsAndStops(data, false, TripReportItem.class); + Collection trips = reportUtils.detectTripsAndStops(mock(Device.class), data, false, TripReportItem.class); assertNotNull(trips); assertFalse(trips.isEmpty()); @@ -119,7 +119,7 @@ public class ReportUtilsTest extends BaseTest { assertEquals(10, itemTrip.getMaxSpeed(), 0.01); assertEquals(3000, itemTrip.getDistance(), 0.01); - Collection stops = reportUtils.detectTripsAndStops(data, false, StopReportItem.class); + Collection stops = reportUtils.detectTripsAndStops(mock(Device.class) ,data, false, StopReportItem.class); assertNotNull(stops); assertFalse(stops.isEmpty()); @@ -160,7 +160,7 @@ public class ReportUtilsTest extends BaseTest { mock(Config.class), storage, mock(PermissionsService.class), tripsConfig, mock(VelocityEngine.class), null); - Collection trips = reportUtils.detectTripsAndStops(data, false, TripReportItem.class); + Collection trips = reportUtils.detectTripsAndStops(mock(Device.class) ,data, false, TripReportItem.class); assertNotNull(trips); assertFalse(trips.isEmpty()); @@ -174,7 +174,7 @@ public class ReportUtilsTest extends BaseTest { assertEquals(10, itemTrip.getMaxSpeed(), 0.01); assertEquals(3000, itemTrip.getDistance(), 0.01); - trips = reportUtils.detectTripsAndStops(data, false, TripReportItem.class); + trips = reportUtils.detectTripsAndStops(mock(Device.class) ,data, false, TripReportItem.class); assertNotNull(trips); assertFalse(trips.isEmpty()); @@ -188,7 +188,7 @@ public class ReportUtilsTest extends BaseTest { assertEquals(10, itemTrip.getMaxSpeed(), 0.01); assertEquals(3000, itemTrip.getDistance(), 0.01); - Collection stops = reportUtils.detectTripsAndStops(data, false, StopReportItem.class); + Collection stops = reportUtils.detectTripsAndStops(mock(Device.class) ,data, false, StopReportItem.class); assertNotNull(stops); assertFalse(stops.isEmpty()); @@ -231,7 +231,7 @@ public class ReportUtilsTest extends BaseTest { mock(Config.class), storage, mock(PermissionsService.class), tripsConfig, mock(VelocityEngine.class), null); - Collection trips = reportUtils.detectTripsAndStops(data, false, TripReportItem.class); + Collection trips = reportUtils.detectTripsAndStops(mock(Device.class) ,data, false, TripReportItem.class); assertNotNull(trips); assertFalse(trips.isEmpty()); @@ -245,7 +245,7 @@ public class ReportUtilsTest extends BaseTest { assertEquals(10, itemTrip.getMaxSpeed(), 0.01); assertEquals(7000, itemTrip.getDistance(), 0.01); - Collection stops = reportUtils.detectTripsAndStops(data, false, StopReportItem.class); + Collection stops = reportUtils.detectTripsAndStops(mock(Device.class) ,data, false, StopReportItem.class); assertNotNull(stops); assertFalse(stops.isEmpty()); @@ -282,7 +282,7 @@ public class ReportUtilsTest extends BaseTest { mock(Config.class), storage, mock(PermissionsService.class), tripsConfig, mock(VelocityEngine.class), null); - Collection result = reportUtils.detectTripsAndStops(data, false, StopReportItem.class); + Collection result = reportUtils.detectTripsAndStops(mock(Device.class) ,data, false, StopReportItem.class); assertNotNull(result); assertFalse(result.isEmpty()); @@ -311,7 +311,7 @@ public class ReportUtilsTest extends BaseTest { mock(Config.class), storage, mock(PermissionsService.class), tripsConfig, mock(VelocityEngine.class), null); - Collection result = reportUtils.detectTripsAndStops(data, false, StopReportItem.class); + Collection result = reportUtils.detectTripsAndStops(mock(Device.class) ,data, false, StopReportItem.class); assertNotNull(result); assertFalse(result.isEmpty()); @@ -340,7 +340,7 @@ public class ReportUtilsTest extends BaseTest { mock(Config.class), storage, mock(PermissionsService.class), tripsConfig, mock(VelocityEngine.class), null); - Collection result = reportUtils.detectTripsAndStops(data, false, StopReportItem.class); + Collection result = reportUtils.detectTripsAndStops(mock(Device.class) ,data, false, StopReportItem.class); assertNotNull(result); assertFalse(result.isEmpty()); @@ -369,7 +369,7 @@ public class ReportUtilsTest extends BaseTest { mock(Config.class), storage, mock(PermissionsService.class), tripsConfig, mock(VelocityEngine.class), null); - Collection result = reportUtils.detectTripsAndStops(data, false, StopReportItem.class); + Collection result = reportUtils.detectTripsAndStops(mock(Device.class) ,data, false, StopReportItem.class); assertNotNull(result); assertTrue(result.isEmpty()); @@ -394,7 +394,7 @@ public class ReportUtilsTest extends BaseTest { mock(Config.class), storage, mock(PermissionsService.class), tripsConfig, mock(VelocityEngine.class), null); - Collection trips = reportUtils.detectTripsAndStops(data, false, TripReportItem.class); + Collection trips = reportUtils.detectTripsAndStops(mock(Device.class) ,data, false, TripReportItem.class); assertNotNull(trips); assertFalse(trips.isEmpty()); @@ -408,7 +408,7 @@ public class ReportUtilsTest extends BaseTest { assertEquals(7, itemTrip.getMaxSpeed(), 0.01); assertEquals(600, itemTrip.getDistance(), 0.01); - Collection stops = reportUtils.detectTripsAndStops(data, false, StopReportItem.class); + Collection stops = reportUtils.detectTripsAndStops(mock(Device.class) ,data, false, StopReportItem.class); assertNotNull(stops); assertFalse(stops.isEmpty()); -- cgit v1.2.3