public StationaryAirConditioner( string manufacturer, string model, EfficiancyRating requiredEfficiancyRating, int powerUsage) : base(manufacturer, model) { this.PowerUsage = powerUsage; this.RequiredEfficiancyRating = requiredEfficiancyRating; this.ActualEfficiancyRating = this.GetRating(powerUsage); }
public string RegisterStationaryAirConditioner(string manufacturer, string model, EfficiancyRating energyEfficiencyRating, int powerUsage) { var airConditioner = new StationaryAirConditioner(manufacturer, model, energyEfficiencyRating, powerUsage); this.Database.AddAirConditioner(airConditioner); string result = string.Format(Messages.RegisterAc, airConditioner.Model, airConditioner.Manufacturer); return result; }
public string RegisterStationaryAirConditioner(string manufacturer, string model, EfficiancyRating energyEfficiencyRating, int powerUsage) { var airConditioner = new StationaryAirConditioner(manufacturer, model, energyEfficiencyRating, powerUsage); this.Database.AddAirConditioner(airConditioner); string result = string.Format(Messages.RegisterAc, airConditioner.Model, airConditioner.Manufacturer); return(result); }
public void RegisterStationaryAirConditioner_IncorrectRating_ShouldThrow() { EfficiancyRating rating = (EfficiancyRating)Enum.Parse(typeof(EfficiancyRating), "Z"); this.controller.RegisterStationaryAirConditioner("Lenovo", "GX2000", rating, 0); }