Exemplo n.º 1
0
        public void build_a_bicycle()
        {
            var myBicycle = FactoryVehicle.CreateVehicle(VehicleType.Bicycle);
            const VehicleType typeExpected = VehicleType.Bicycle;

            Assert.AreEqual(typeExpected, myBicycle.Type);
        }
Exemplo n.º 2
0
        public void build_a_car()
        {
            var myCar = FactoryVehicle.CreateVehicle(VehicleType.Car);
            const VehicleType typeExpected = VehicleType.Car;

            Assert.AreEqual(typeExpected, myCar.Type);
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            IParkingLot parkingLot = BuildParkingLot();

            if (parkingLot != null)
            {
                //// Configure Parking Lot with Paking Slots
                //parkingLot.ConfigureParking();

                VehicleBase vehicle = FactoryVehicle.Create(VehicleType.Bus);

                AllocateParkingSlot(vehicle, parkingLot);
            }
        }
Exemplo n.º 4
0
 public void build_something()
 {
     var myCar = FactoryVehicle.CreateVehicle((VehicleType)100);
 }