Пример #1
0
        private string getGasCarToFuelRegNum()
        {
            string    registrationNumber = string.Empty;
            eFuelType fuelType           = eFuelType.None;

            registrationNumber = getExistingRegistrationNumberFromUser();

            if (m_Garage.CheckIfFueableCar(registrationNumber) == true)
            {
                fuelType = getFuelTypeInput();

                if (m_Garage.CheckIfValidFuelType(registrationNumber, fuelType) == false)
                {
                    throw new ArgumentException("Invalid_Fuel_Type");
                }
            }
            else
            {
                throw new ArgumentException("Not_Fuelable_Vehicle");
            }

            return(registrationNumber);
        }