From 668d0c65609cc510ad9da3be4fc7aafaa3ca427d Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Wed, 16 Aug 2017 11:04:41 +0500 Subject: Combine trips and stops detectors and some optimization --- test/org/traccar/reports/ReportUtilsTest.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'test') diff --git a/test/org/traccar/reports/ReportUtilsTest.java b/test/org/traccar/reports/ReportUtilsTest.java index c74109550..c82853161 100644 --- a/test/org/traccar/reports/ReportUtilsTest.java +++ b/test/org/traccar/reports/ReportUtilsTest.java @@ -81,7 +81,7 @@ public class ReportUtilsTest extends BaseTest { TripsConfig tripsConfig = new TripsConfig(500, 300000, 180000, 900000, false); - Collection trips = ReportUtils.detectTrips(data, tripsConfig, false, 0.01); + Collection trips = ReportUtils.detectTripsAndStops(data, tripsConfig, false, 0.01, TripReport.class); assertNotNull(trips); assertFalse(trips.isEmpty()); @@ -95,7 +95,7 @@ public class ReportUtilsTest extends BaseTest { assertEquals(10, itemTrip.getMaxSpeed(), 0.01); assertEquals(3000, itemTrip.getDistance(), 0.01); - Collection stops = ReportUtils.detectStops(data, tripsConfig, false, 0.01); + Collection stops = ReportUtils.detectTripsAndStops(data, tripsConfig, false, 0.01, StopReport.class); assertNotNull(stops); assertFalse(stops.isEmpty()); @@ -129,7 +129,7 @@ public class ReportUtilsTest extends BaseTest { TripsConfig tripsConfig = new TripsConfig(500, 300000, 200000, 900000, false); - Collection result = ReportUtils.detectStops(data, tripsConfig, false, 0.01); + Collection result = ReportUtils.detectTripsAndStops(data, tripsConfig, false, 0.01, StopReport.class); assertNotNull(result); assertFalse(result.isEmpty()); @@ -155,7 +155,7 @@ public class ReportUtilsTest extends BaseTest { TripsConfig tripsConfig = new TripsConfig(500, 300000, 200000, 900000, false); - Collection result = ReportUtils.detectStops(data, tripsConfig, false, 0.01); + Collection result = ReportUtils.detectTripsAndStops(data, tripsConfig, false, 0.01, StopReport.class); assertNotNull(result); assertFalse(result.isEmpty()); @@ -181,7 +181,7 @@ public class ReportUtilsTest extends BaseTest { TripsConfig tripsConfig = new TripsConfig(500, 300000, 200000, 900000, false); - Collection result = ReportUtils.detectStops(data, tripsConfig, false, 0.01); + Collection result = ReportUtils.detectTripsAndStops(data, tripsConfig, false, 0.01, StopReport.class); assertNotNull(result); assertFalse(result.isEmpty()); @@ -207,7 +207,7 @@ public class ReportUtilsTest extends BaseTest { TripsConfig tripsConfig = new TripsConfig(500, 300000, 200000, 900000, false); - Collection result = ReportUtils.detectStops(data, tripsConfig, false, 0.01); + Collection result = ReportUtils.detectTripsAndStops(data, tripsConfig, false, 0.01, StopReport.class); assertNotNull(result); assertTrue(result.isEmpty()); @@ -229,7 +229,7 @@ public class ReportUtilsTest extends BaseTest { TripsConfig tripsConfig = new TripsConfig(500, 200000, 200000, 900000, false); - Collection trips = ReportUtils.detectTrips(data, tripsConfig, false, 0.01); + Collection trips = ReportUtils.detectTripsAndStops(data, tripsConfig, false, 0.01, TripReport.class); assertNotNull(trips); assertFalse(trips.isEmpty()); @@ -243,7 +243,7 @@ public class ReportUtilsTest extends BaseTest { assertEquals(7, itemTrip.getMaxSpeed(), 0.01); assertEquals(600, itemTrip.getDistance(), 0.01); - Collection stops = ReportUtils.detectStops(data, tripsConfig, false, 0.01); + Collection stops = ReportUtils.detectTripsAndStops(data, tripsConfig, false, 0.01, StopReport.class); assertNotNull(stops); assertFalse(stops.isEmpty()); -- cgit v1.2.3