public void Distance_display_after_driving_once() { var car = new RemoteControlCar(); car.Drive(); Assert.Equal("Driven 20 meters", car.DistanceDisplay()); }
public void Distance_display_after_driving_multiple_times() { var car = new RemoteControlCar(); for (var i = 0; i < 17; i++) { car.Drive(); } Assert.Equal("Driven 340 meters", car.DistanceDisplay()); }
public void Distance_display_when_battery_empty() { var car = new RemoteControlCar(); // Drain the battery for (var i = 0; i < 100; i++) { car.Drive(); } // Attempt to drive one more time (should not work) car.Drive(); Assert.Equal("Driven 2000 meters", car.DistanceDisplay()); }
public void New_car_distance_display() { var car = new RemoteControlCar(); Assert.Equal("Driven 0 meters", car.DistanceDisplay()); }