Example #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();
        }
Example #2
0
 public void DoTest(AbstractCar car)
 {
     //Car car = new Car();
     car.Run();
 }
Example #3
0
 public CarBuilder(AbstractCar car)
 {
     carInProgress = car;
 }