Skip to content

Commit

Permalink
Closes #2796 (#2821)
Browse files Browse the repository at this point in the history
[no important files changed]
  • Loading branch information
JoaquimEsteves authored Jul 14, 2024
1 parent abe1822 commit bb84cf1
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@ public void new_remote_control_car_battery_is_not_drained() {
assertThat(car.batteryDrained()).isFalse();
}

@Test
@Tag("task:4")
@DisplayName("The batteryDrained method returns false when there's not enough battery")
public void new_remote_control_car_that_can_only_drive_once() {
var car = new NeedForSpeed(1, 99);
car.drive();
assertThat(car.batteryDrained()).isTrue();
// Ensure that the car was driven once
assertThat(car.distanceDriven()).isEqualTo(1);
}

@Test
@Tag("task:4")
@DisplayName("The batteryDrained method returns false when car battery did not completely drain after driving")
Expand Down

0 comments on commit bb84cf1

Please sign in to comment.