Ejemplo n.º 1
0
        public void FuelingVehicle()
        {
            string licenseNumber = GarageUI.GetLicenseNumber();

            if (licenseNumber != null)
            {
                Utils.FuelTypes typeFuel = GarageUI.GetTypeFuel();
                float           addFuel  = GarageUI.GetAmountFuel();
                try
                {
                    garage.FuelingVehicle(licenseNumber, typeFuel, addFuel);
                    GarageUI.MesegeSucceeded();
                }
                catch (ValueOutOfRangeException)
                {
                    GarageUI.MesegeError();
                }
            }
            else
            {
                GarageUI.NotHaveVehicleInGarage();
            }
            GarageUI.MesegeToContinue();
        }