Exemple #1
0
        public void Drive_ShouldResetDailyOdometer_Zero()
        {
            var car = new Car.Car(Color.Black, "Ford", 5.7f, 40);

            car.Refuel(10);
            car.Drive(10);
            car.Drive(20);
            car.ResetDailyOdometer();

            car.DailyOdometer.Should().Be(0);
        }
Exemple #2
0
        public void Drive_ShouldIncreaseOdometerAndCalculateFuelNeededToDrive_ExceptionIfFuelIsNotEnought()
        {
            var car = new Car.Car(Color.Black, "Ford", 5.7f, 40);

            car.Refuel(14.0f);
            car.Drive(100);

            car.Odometer.Should().Be(100);
        }