Esempio n. 1
0
        public void should_return_null_if_try_park_to_full_parkinglot()
        {
            var fullParkingLot = new ParkingLot(1);
            fullParkingLot.Park(new Car());

            Assert.Null(fullParkingLot.Park(new Car()));
        }
Esempio n. 2
0
        public void should_able_to_park_a_car_after_pick_a_car()
        {
            var fullParkingLot = new ParkingLot(1);
            fullParkingLot.Pick(fullParkingLot.Park(new Car()));

            Assert.NotNull(fullParkingLot.Park(new Car()));
        }
Esempio n. 3
0
 public void should_park_car_correctly()
 {
     var car = new Car();
     var parkingLot = new ParkingLot();
     smartParkingBoy.Manage(parkingLot);
     var token = smartParkingBoy.Park(car);
     Assert.Same(car, parkingLot.Pick(token));
 }
Esempio n. 4
0
 public void should_park_cars_to_most_empty_parkinglot()
 {
     var car = new Car();
     var parkingLot = new ParkingLot(3);
     var moreEmptyParkingLot = new ParkingLot(4);
     smartParkingBoy.Manage(parkingLot, moreEmptyParkingLot);
     var token = smartParkingBoy.Park(car);
     Assert.Same(car, moreEmptyParkingLot.Pick(token));
 }
Esempio n. 5
0
        public void should_able_to_pick_car_in_second_parking_lots()
        {
            var secondParkingLot = new ParkingLot();
            smartParkingBoy.Manage(new ParkingLot(), secondParkingLot);
            var car = new Car();
            var ticket = secondParkingLot.Park(car);

            Assert.Same(car, smartParkingBoy.Pick(ticket));
        }
Esempio n. 6
0
 public void should_park_cars_sequencely()
 {
     var car = new Car();
     var fullParkingLot = new ParkingLot(0);
     var parkingLot = new ParkingLot();
     parkingBoy.Manage(fullParkingLot, parkingLot);
     var token = parkingBoy.Park(car);
     Assert.Same(car, parkingLot.Pick(token));
 }
Esempio n. 7
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));
 }
Esempio n. 8
0
 public void should_park_cars_to_max_empty_rate_parkinglot()
 {
     var car = new Car();
     var parkingLot = new ParkingLot(5);
     var moreEmptyRateParkingLot = new ParkingLot(3);
     parkingLot.Park(new Car());
     superParkingBoy.Manage(parkingLot, moreEmptyRateParkingLot);
     var token = superParkingBoy.Park(car);
     Assert.Same(car, moreEmptyRateParkingLot.Pick(token));
 }
Esempio n. 9
0
 public PakingLotFact()
 {
     parkingLot = new ParkingLot();
 }
Esempio n. 10
0
 public PakingLotFact()
 {
     parkingLot = new ParkingLot();
 }