public void Should_not_disembark_passenger_when_current_place_has_no_smart_forwto() { var currentPlace = new Airplane(); var destinyPlace = Terminal.CreateWithSmartFortwo(new List <CrewMember>()); var excpetion = Assert.Throws <Exception>(() => _movementService.DisembarkPassenger(currentPlace, destinyPlace)); var expectedMessage = "The smart fortwo was not found!"; Assert.Equal(expectedMessage, excpetion.Message); }
public void Execute() { _tripInformerService.ShowStartMessage(); _tripInformerService.ShowTripStateInfo(_currentPlace, _destinyPlace); _movementService.PutInTheSmartFortwo(_currentPlace.CrewMembers.FirstOrDefault(x => x is Pilot), _currentPlace.CrewMembers.FirstOrDefault(x => x is Officer), _currentPlace, _destinyPlace); Move(); _movementService.DisembarkPassenger(_currentPlace, _destinyPlace); Move(); _movementService.PutInTheSmartFortwo(null, _currentPlace.CrewMembers.FirstOrDefault(x => x is Officer), _currentPlace, _destinyPlace); Move(); _movementService.DisembarkPassenger(_currentPlace, _destinyPlace); Move(); _movementService.DisembarkDriver(_currentPlace, _destinyPlace); _movementService.PutInTheSmartFortwo(_currentPlace.CrewMembers.FirstOrDefault(x => x is FlightServiceChief), _currentPlace.CrewMembers.FirstOrDefault(x => x is FlightAttendant), _currentPlace, _destinyPlace); Move(); _movementService.DisembarkPassenger(_currentPlace, _destinyPlace); Move(); _movementService.PutInTheSmartFortwo(null, _currentPlace.CrewMembers.FirstOrDefault(x => x is FlightAttendant), _currentPlace, _destinyPlace); Move(); _movementService.DisembarkPassenger(_currentPlace, _destinyPlace); Move(); _movementService.PutInTheSmartFortwo(null, _currentPlace.CrewMembers.FirstOrDefault(x => x is Pilot), _currentPlace, _destinyPlace); Move(); _movementService.DisembarkPassenger(_currentPlace, _destinyPlace); Move(); _movementService.DisembarkDriver(_currentPlace, _destinyPlace); _movementService.PutInTheSmartFortwo(_currentPlace.CrewMembers.FirstOrDefault(x => x is Policeman), _currentPlace.CrewMembers.FirstOrDefault(x => x is Prisoner), _currentPlace, _destinyPlace); Move(); _movementService.DisembarkAll(_currentPlace, _destinyPlace); _movementService.PutInTheSmartFortwo(_currentPlace.CrewMembers.FirstOrDefault(x => x is Pilot), null, _currentPlace, _destinyPlace); Move(); _movementService.PutInTheSmartFortwo(null, _currentPlace.CrewMembers.FirstOrDefault(x => x is FlightServiceChief), _currentPlace, _destinyPlace); Move(); _movementService.DisembarkAll(_currentPlace, _destinyPlace); }