public void ChoiceOfTimeUnitWeek() { TimeRent time = new TimeRent(); var result = time.CalculateTime("W"); Assert.AreEqual(60, result.Prices.PriceChoise); }
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); }
public Rental() { Discounts = new Discounts(); TimeRent = new TimeRent(); }