aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-08-20 09:26:57 +0500
committerAbyss777 <abyss@fox5.ru>2016-08-20 09:26:57 +0500
commit1ce8c1945e36acd56b7ceb87b900a0efa14e9ecd (patch)
tree878541247d4d6369f97a01d16e36dec167a14203 /test
parent1c7437d6de01fffbe3f69853717808b1790413fd (diff)
downloadtraccar-server-1ce8c1945e36acd56b7ceb87b900a0efa14e9ecd.tar.gz
traccar-server-1ce8c1945e36acd56b7ceb87b900a0efa14e9ecd.tar.bz2
traccar-server-1ce8c1945e36acd56b7ceb87b900a0efa14e9ecd.zip
- Renamed calculateFuel
- Used int in BigDecimal constructor - Added extra space
Diffstat (limited to 'test')
-rw-r--r--test/org/traccar/reports/ReportUtilsTest.java8
1 files changed, 5 insertions, 3 deletions
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 %");
}
}