aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/reports
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-08-16 11:04:41 +0500
committerAbyss777 <abyss@fox5.ru>2017-08-16 11:06:21 +0500
commit668d0c65609cc510ad9da3be4fc7aafaa3ca427d (patch)
treee3c3359bab09fdd42bb441ec5ffbedf0e0964329 /test/org/traccar/reports
parent4d7805f783f00914a289b2447521a2f467de87bc (diff)
downloadtraccar-server-668d0c65609cc510ad9da3be4fc7aafaa3ca427d.tar.gz
traccar-server-668d0c65609cc510ad9da3be4fc7aafaa3ca427d.tar.bz2
traccar-server-668d0c65609cc510ad9da3be4fc7aafaa3ca427d.zip
Combine trips and stops detectors and some optimization
Diffstat (limited to 'test/org/traccar/reports')
-rw-r--r--test/org/traccar/reports/ReportUtilsTest.java16
1 files changed, 8 insertions, 8 deletions
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<TripReport> trips = ReportUtils.detectTrips(data, tripsConfig, false, 0.01);
+ Collection<TripReport> 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<StopReport> stops = ReportUtils.detectStops(data, tripsConfig, false, 0.01);
+ Collection<StopReport> 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<StopReport> result = ReportUtils.detectStops(data, tripsConfig, false, 0.01);
+ Collection<StopReport> 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<StopReport> result = ReportUtils.detectStops(data, tripsConfig, false, 0.01);
+ Collection<StopReport> 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<StopReport> result = ReportUtils.detectStops(data, tripsConfig, false, 0.01);
+ Collection<StopReport> 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<StopReport> result = ReportUtils.detectStops(data, tripsConfig, false, 0.01);
+ Collection<StopReport> 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<TripReport> trips = ReportUtils.detectTrips(data, tripsConfig, false, 0.01);
+ Collection<TripReport> 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<StopReport> stops = ReportUtils.detectStops(data, tripsConfig, false, 0.01);
+ Collection<StopReport> stops = ReportUtils.detectTripsAndStops(data, tripsConfig, false, 0.01, StopReport.class);
assertNotNull(stops);
assertFalse(stops.isEmpty());