public void CalculateCost(ParkingType parkingType, int minutes)
        {
            IParkingCostCalculator calculator = CalculatorFactory.CreateCalculator(parkingType);

            _view.GiveParkingCost(calculator.CalculateCost(minutes));
        }
示例#2
0
 public void Should_charge_2_dollars_when_park_less_than_1_hour_shortly(int minutes, double charge)
 {
     Assert.That(_costCalculator.CalculateCost(minutes), Is.EqualTo(charge));
 }
示例#3
0
 public void Should_charge_12_dollars_when_valet_parking_time_is_less_than_5_hours()
 {
     Assert.That(_costCalculator.CalculateCost(MinuteConvertor.Hours(5)), Is.EqualTo(12));
 }