Exemplo n.º 1
0
        //public void BuildTestContext(AbstractCar car)
        //{
        //    //Car car = new Car();
        //    //...

        //    car.Startup();

        //    //如果要有n个car
        //    AbstractCar car1 =
        //}

        public void BuildTestContext(CarFactory carFactory)
        {
            AbstractCar c1 = carFactory.CreateCar();

            //AbstractCar c2 = carFactory.CreateCar();
        }
Exemplo n.º 2
0
 public void DoTest(AbstractCar car)
 {
     //Car car = new Car();
     car.Run();
 }
Exemplo n.º 3
0
 public CarBuilder(AbstractCar car)
 {
     carInProgress = car;
 }