Beispiel #1
0
        private void ParkingValorBtn_Click(object sender, EventArgs e)
        {
            int stringParsed;

            if (Int32.TryParse(this.parkingValorTxt.Text, out stringParsed) && stringParsed >= 0)
            {
                parkingSystem.AdjustParkingCostPerMinute(stringParsed);
                this.outPutLbl.Text      = "Costo de parking modificado con exito.";
                this.outPutLbl.ForeColor = Color.Green;
            }
            else
            {
                this.outPutLbl.Text      = "Error: Ingrese un numero entero positivo por favor.";
                this.outPutLbl.ForeColor = Color.Red;
            }
        }
Beispiel #2
0
 public void AdjustParkingCostPerMinuteTest()
 {
     system.AdjustParkingCostPerMinute(2);
     Assert.AreEqual(system.CurrentCountry.CostPerMinut, 2);
 }