diff options
author | Abyss777 <abyss@fox5.ru> | 2016-08-20 09:26:57 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2016-08-20 09:26:57 +0500 |
commit | 1ce8c1945e36acd56b7ceb87b900a0efa14e9ecd (patch) | |
tree | 878541247d4d6369f97a01d16e36dec167a14203 /test/org/traccar | |
parent | 1c7437d6de01fffbe3f69853717808b1790413fd (diff) | |
download | trackermap-server-1ce8c1945e36acd56b7ceb87b900a0efa14e9ecd.tar.gz trackermap-server-1ce8c1945e36acd56b7ceb87b900a0efa14e9ecd.tar.bz2 trackermap-server-1ce8c1945e36acd56b7ceb87b900a0efa14e9ecd.zip |
- Renamed calculateFuel
- Used int in BigDecimal constructor
- Added extra space
Diffstat (limited to 'test/org/traccar')
-rw-r--r-- | test/org/traccar/reports/ReportUtilsTest.java | 8 |
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 %"); } } |