public void BuildCar() { TeslaBuilder builder = new TeslaBuilder(); _director.Construct(builder); Console.WriteLine("Tesla Sport Car"); }
public void CarBuilderTest() { //arrange Car expectedResult = new Car() { FuelType = Fuel.Solar, MaxSpeed = 201, SeatCount = 2 }; Car result = null; //act var builder = new TeslaBuilder(); builder.SetFuel(); builder.SetMaxSpeed(); builder.SetSeatCount(); result = builder.GetCar; //assert Assert.AreEqual(expectedResult, result); }