From bc0c4319245de8e4ff62f005b22fc73350090d9e Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Tue, 20 Jun 2017 17:07:37 +0500 Subject: Change type of 'spentFuel' to double --- test/org/traccar/reports/ReportUtilsTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/org/traccar/reports') diff --git a/test/org/traccar/reports/ReportUtilsTest.java b/test/org/traccar/reports/ReportUtilsTest.java index 2fe05e688..adcdf5875 100644 --- a/test/org/traccar/reports/ReportUtilsTest.java +++ b/test/org/traccar/reports/ReportUtilsTest.java @@ -60,10 +60,10 @@ public class ReportUtilsTest extends BaseTest { public void testCalculateSpentFuel() { Position startPosition = new Position(); Position endPosition = new Position(); - Assert.assertNull(ReportUtils.calculateFuel(startPosition, endPosition)); + Assert.assertEquals(ReportUtils.calculateFuel(startPosition, endPosition), 0.0, 0.01); startPosition.set(Position.KEY_FUEL_LEVEL, 0.7); endPosition.set(Position.KEY_FUEL_LEVEL, 0.5); - Assert.assertEquals(ReportUtils.calculateFuel(startPosition, endPosition), "0.2"); + Assert.assertEquals(ReportUtils.calculateFuel(startPosition, endPosition), 0.2, 0.01); } @Test -- cgit v1.2.3