Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/main/java/com/smartcar/sdk/data/VehicleFuel.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

/** POJO for Smartcar /fuel endpoint */
public class VehicleFuel extends ApiData {
private double range;
private double percentRemaining;
private double amountRemaining;
private Double range;
private Double percentRemaining;
private Double amountRemaining;

/**
* Returns the fuel range
*
* @return fuel range
*/
public double getRange() {
public Double getRange() {
return this.range;
}

Expand All @@ -20,7 +20,7 @@ public double getRange() {
*
* @return fuel percent remaining
*/
public double getPercentRemaining() {
public Double getPercentRemaining() {
return this.percentRemaining;
}

Expand All @@ -29,7 +29,7 @@ public double getPercentRemaining() {
*
* @return fuel amount remaining
*/
public double getAmountRemaining() {
public Double getAmountRemaining() {
return this.amountRemaining;
}

Expand Down
6 changes: 3 additions & 3 deletions src/test/java/com/smartcar/sdk/VehicleTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ public void testFuel() throws Exception {

VehicleFuel fuel = this.subject.fuel();

Assert.assertEquals(fuel.getAmountRemaining(), 53.2);
Assert.assertEquals(fuel.getPercentRemaining(), 0.3);
Assert.assertEquals(fuel.getRange(), 40.5);
Assert.assertEquals(fuel.getAmountRemaining(), Double.valueOf(53.2));
Assert.assertEquals(fuel.getPercentRemaining(), Double.valueOf(0.3));
Assert.assertEquals(fuel.getRange(), Double.valueOf(40.5));
}

@Test
Expand Down