From 1ce8c1945e36acd56b7ceb87b900a0efa14e9ecd Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Sat, 20 Aug 2016 09:26:57 +0500 Subject: - Renamed calculateFuel - Used int in BigDecimal constructor - Added extra space --- test/org/traccar/reports/ReportUtilsTest.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'test/org/traccar/reports') diff --git a/test/org/traccar/reports/ReportUtilsTest.java b/test/org/traccar/reports/ReportUtilsTest.java index e7f762b28..80b0f6287 100644 --- a/test/org/traccar/reports/ReportUtilsTest.java +++ b/test/org/traccar/reports/ReportUtilsTest.java @@ -22,13 +22,15 @@ public class ReportUtilsTest { public void testCalculateSpentFuel() { Position startPosition = new Position(); Position endPosition = new Position(); - Assert.assertEquals(ReportUtils.calculateSpentFuel(startPosition, endPosition), "-"); + Assert.assertEquals(ReportUtils.calculateFuel(startPosition, endPosition), "-"); startPosition.setProtocol("meitrack"); startPosition.set(Position.KEY_FUEL, 0.07); endPosition.set(Position.KEY_FUEL, 0.05); - Assert.assertEquals(ReportUtils.calculateSpentFuel(startPosition, endPosition), "0.02 %"); + Assert.assertEquals(ReportUtils.calculateFuel(startPosition, endPosition), "0.02 %"); startPosition.setProtocol("galileo"); - Assert.assertEquals(ReportUtils.calculateSpentFuel(startPosition, endPosition), "0.02 %"); + Assert.assertEquals(ReportUtils.calculateFuel(startPosition, endPosition), "0.02 %"); + startPosition.setProtocol("noran"); + Assert.assertEquals(ReportUtils.calculateFuel(startPosition, endPosition), "0.02 %"); } } -- cgit v1.2.3