Exemplo n.º 1
0
        public void ChoiceOfTimeUnitWeek()
        {
            TimeRent time   = new TimeRent();
            var      result = time.CalculateTime("W");

            Assert.AreEqual(60, result.Prices.PriceChoise);
        }
Exemplo n.º 2
0
        public TimeRent CalculateTime(string identifyTime)
        {
            TimeRent timeRent = new TimeRent
            {
                IdentifyTime = identifyTime,
                Prices       = new Price()
            };

            switch (identifyTime.ToLower())
            {
            case "h":
                timeRent.Prices.PriceChoise = Prices.Hour;
                break;

            case "d":
                timeRent.Prices.PriceChoise = Prices.Day;
                break;

            case "w":
                timeRent.Prices.PriceChoise = Prices.Week;
                break;
            }
            return(timeRent);
        }
Exemplo n.º 3
0
 public Rental()
 {
     Discounts = new Discounts();
     TimeRent  = new TimeRent();
 }