Exemple #1
0
 public void should_able_to_let_his_parking_boy_to_pick_car()
 {
     var parkingBoy = new ParkingBoy();
     var parkingLot = new ParkingLot();
     parkingBoy.Manage(parkingLot);
     parkingManager.Manage(parkingBoy);
     var car = new Car();
     var token = parkingBoy.Park(car);
     Assert.Same(car, parkingManager.Pick(token));
 }
Exemple #2
0
        public void should_report_for_a_parking_manager_who_has_one_parking_lot_and_one_parking_boy_with_one_parking_lot()
        {
            var parkingManager = new ParkingManager();
            parkingManager.Manage(new ParkingLot(5));
            var parkingBoy = new ParkingBoy();
            parkingBoy.Manage(new ParkingLot(10));
            parkingManager.Manage(parkingBoy);
            var parkingDirector = new ParkingDirector();

            Assert.Equal("M 0 15\n  P 0 5\n  B 0 10\n    P 0 10", parkingDirector.Report(parkingManager));
        }
Exemple #3
0
        public void should_report_for_a_parking_manager_who_has_one_parking_lot_and_two_parking_boys_with_one_parking_lot()
        {
            var parkingManager = new ParkingManager();

            parkingManager.Manage(new ParkingLot(5));
            var parkingBoy = new ParkingBoy();

            parkingBoy.Manage(new ParkingLot(10));
            parkingManager.Manage(parkingBoy, new ParkingBoy());
            var parkingDirector = new ParkingDirector();

            Assert.Equal("M 0 15\n  P 0 5\n  B 0 10\n    P 0 10\n  B 0 0", parkingDirector.Report(parkingManager));
        }
Exemple #4
0
        public void should_able_to_let_his_parking_boy_who_has_availible_parking_lot_to_park_cars()
        {
            var parkingBoy = new ParkingBoy();
            var smartParkingBoy = ParkingBoy.SmartEvolution();
            parkingBoy.Manage(new ParkingLot(1));
            smartParkingBoy.Manage(new ParkingLot(1));

            parkingManager.Manage(parkingBoy, smartParkingBoy);

            var car = new Car();
            parkingBoy.Park(new Car());
            var tokenOfParkingBoy = parkingManager.Park(car);
            Assert.Same(car, smartParkingBoy.Pick(tokenOfParkingBoy));
        }
Exemple #5
0
        public void should_able_to_let_his_parking_boy_who_has_availible_parking_lot_to_park_cars()
        {
            var parkingBoy      = new ParkingBoy();
            var smartParkingBoy = ParkingBoy.SmartEvolution();

            parkingBoy.Manage(new ParkingLot(1));
            smartParkingBoy.Manage(new ParkingLot(1));

            parkingManager.Manage(parkingBoy, smartParkingBoy);

            var car = new Car();

            parkingBoy.Park(new Car());
            var tokenOfParkingBoy = parkingManager.Park(car);

            Assert.Same(car, smartParkingBoy.Pick(tokenOfParkingBoy));
        }
Exemple #6
0
 public SmartParkingBoyFact()
 {
     smartParkingBoy = ParkingBoy.SmartEvolution();
 }
Exemple #7
0
 public ParkingBoyFact()
 {
     parkingBoy = new ParkingBoy();
 }
Exemple #8
0
 public SmartParkingBoyFact()
 {
     smartParkingBoy = ParkingBoy.SmartEvolution();
 }
Exemple #9
0
 public ParkingBoyFact()
 {
     parkingBoy = new ParkingBoy();
 }
Exemple #10
0
 public SuperParkingBoyFact()
 {
     superParkingBoy = ParkingBoy.SuperEvolution();
 }
Exemple #11
0
 public SuperParkingBoyFact()
 {
     superParkingBoy = ParkingBoy.SuperEvolution();
 }