public void Should_show_start_message() { var output = new StringWriter(); Console.SetOut(output); _service.ShowStartMessage(); var expectedOutput = "Started\n\r\n"; Assert.Equal(expectedOutput, output.ToString()); }
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); }