public IAdjustableChair CreateAdjustableChair(string model, string materialType, decimal price, decimal height, int numberOfLegs) { // TODO: Implement this method IAdjustableChair chair = new AdjustableChair(height, materialType, model, price, numberOfLegs); return(chair); }
public IAdjustableChair CreateAdjustableChair(string model, string materialType, decimal price, decimal height, int numberOfLegs) { MaterialType matType = GetMaterialType(materialType); AdjustableChair chair = new AdjustableChair(model, matType, price, height, numberOfLegs); return(chair); }
public void SetHeight_WhenSetHeightWithValidDataIsPassed() { var adjustableChair = new AdjustableChair("Visage", "Wood", 65, 1.20m, 4); adjustableChair.SetHeight(0.10m); Assert.AreEqual(0.10, adjustableChair.Height); }
public void NotSetHeight_WhenInvalidHeightIsPassed(decimal height) { var adjustableChair = new AdjustableChair("Visage", "Wood", 65, 1.20m, 4); adjustableChair.SetHeight(height); Assert.AreEqual(1.20, adjustableChair.Height); }
public IAdjustableChair CreateAdjustableChair(string model, string materialType, decimal price, decimal height, int numberOfLegs) { if (!adjustableChairs.Contains(model)) { var adjustableChair = new AdjustableChair(model, materialType, price, height, numberOfLegs); adjustableChairs.Add(model); return(adjustableChair); } else { throw new Exception("Adjustable Chair with this model is already added"); } }
public IAdjustableChair CreateAdjustableChair( string model, string materialType, decimal price, decimal height, int numberOfLegs) { IAdjustableChair adjustableChair = new AdjustableChair( model, this.GetMaterialType(materialType), price, height, numberOfLegs); return(adjustableChair); }