BAEL-804 - minor code refactors
This commit is contained in:
parent
75c9345efa
commit
19439943b7
|
@ -4,7 +4,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>gateway</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>cd
|
||||
|
||||
<parent>
|
||||
<artifactId>parent-boot-4</artifactId>
|
||||
|
|
|
@ -18,7 +18,7 @@ import com.baeldung.spring.drools.model.TaxiRide;
|
|||
public class TaxiFareCalculatorServiceIntegrationTest {
|
||||
|
||||
@Autowired
|
||||
TaxiFareCalculatorService taxiFareCalculatorService;
|
||||
private TaxiFareCalculatorService taxiFareCalculatorService;
|
||||
|
||||
@Test
|
||||
public void whenNightSurchargeFalseAndDistanceLessThan10_thenFixFareWithoutNightSurcharge() {
|
||||
|
@ -27,6 +27,7 @@ public class TaxiFareCalculatorServiceIntegrationTest {
|
|||
taxiRide.setDistanceInMile(9L);
|
||||
Fare rideFare = new Fare();
|
||||
Long totalCharge = taxiFareCalculatorService.calculateFare(taxiRide, rideFare);
|
||||
|
||||
assertNotNull(totalCharge);
|
||||
assertEquals(Long.valueOf(70), totalCharge);
|
||||
}
|
||||
|
@ -38,6 +39,7 @@ public class TaxiFareCalculatorServiceIntegrationTest {
|
|||
taxiRide.setDistanceInMile(5L);
|
||||
Fare rideFare = new Fare();
|
||||
Long totalCharge = taxiFareCalculatorService.calculateFare(taxiRide, rideFare);
|
||||
|
||||
assertNotNull(totalCharge);
|
||||
assertEquals(Long.valueOf(100), totalCharge);
|
||||
}
|
||||
|
@ -49,6 +51,7 @@ public class TaxiFareCalculatorServiceIntegrationTest {
|
|||
taxiRide.setDistanceInMile(50L);
|
||||
Fare rideFare = new Fare();
|
||||
Long totalCharge = taxiFareCalculatorService.calculateFare(taxiRide, rideFare);
|
||||
|
||||
assertNotNull(totalCharge);
|
||||
assertEquals(Long.valueOf(170), totalCharge);
|
||||
}
|
||||
|
@ -60,6 +63,7 @@ public class TaxiFareCalculatorServiceIntegrationTest {
|
|||
taxiRide.setDistanceInMile(50L);
|
||||
Fare rideFare = new Fare();
|
||||
Long totalCharge = taxiFareCalculatorService.calculateFare(taxiRide, rideFare);
|
||||
|
||||
assertNotNull(totalCharge);
|
||||
assertEquals(Long.valueOf(250), totalCharge);
|
||||
}
|
||||
|
@ -71,6 +75,7 @@ public class TaxiFareCalculatorServiceIntegrationTest {
|
|||
taxiRide.setDistanceInMile(100L);
|
||||
Fare rideFare = new Fare();
|
||||
Long totalCharge = taxiFareCalculatorService.calculateFare(taxiRide, rideFare);
|
||||
|
||||
assertNotNull(totalCharge);
|
||||
assertEquals(Long.valueOf(220), totalCharge);
|
||||
}
|
||||
|
@ -82,6 +87,7 @@ public class TaxiFareCalculatorServiceIntegrationTest {
|
|||
taxiRide.setDistanceInMile(100L);
|
||||
Fare rideFare = new Fare();
|
||||
Long totalCharge = taxiFareCalculatorService.calculateFare(taxiRide, rideFare);
|
||||
|
||||
assertNotNull(totalCharge);
|
||||
assertEquals(Long.valueOf(350), totalCharge);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue