public void MakeCarTest() { StockCarFactory factory = new StockCarFactory(); Car car = factory.MakeCar(1); Assert.AreEqual("Sedan", car.GetType()); }
public void MakeCarWithDecorator() { StockCarFactory factory = new StockCarFactory(); ICar car = factory.MakeCar(2); car = new CruiseControlDecorator(car); Assert.AreEqual("Pickup Truck, with cruise control", car.GetType()); Assert.AreEqual(710000, car.GetPrice()); }