public void should_not_pick_car_when_the_car_is_not_in_parking_lot() { var smartParkingBoy = new SmartParkingBoy(new ParkingLot(1)); var token = Guid.NewGuid().ToString(); smartParkingBoy.Invoking(p => p.Pick(token)) .ShouldThrow <CarNotFoundException>() .WithMessage("Cannot find the car."); }
public void should_not_park_car_when_all_managed_parking_lots_are_full() { var parkingLot = new ParkingLotBuilder() .WithCapacity(1) .WithOccupiedParkingSpace(1) .Create(); var smartParkingBoy = new SmartParkingBoy(parkingLot); smartParkingBoy.Invoking(p => p.Park(new Car())) .ShouldThrow <ParkingFailedException>() .WithMessage("Cannot park at this moment."); }