public void Should_take_a_passenger_to_plane_with_two_driver() { var boss = BossFake.Default(); var pillot = PilotFake.Default(); var officialOne = OfficialFake.Default(); var officialTwo = OfficialFake.Default(); var stewardessOne = StewardessFake.Default(); var stewardessTwo = StewardessFake.Default(); var cop = CopFake.Default(); var prisoner = PrisonerFake.Default(); _terminal.AddPassengers(stewardessOne, stewardessTwo, cop, prisoner); _airplane.AddPassengers(officialOne, officialTwo); var passengers = new List <Person> { boss, pillot }; _terminalService.MoveFromTerminal().Returns(passengers); _smartForTwoService.TakeToThePlane(); var airplanePassenger = _airplane.GetPassengers(); airplanePassenger.FirstOrDefault(x => x.GetType() == typeof(Pilot)).Should().NotBeNull(); _airplane.HavePassengers().Should().BeTrue(); _smartForTwo.GetPassengers().Count().Should().Be(1); }
public void Should_Returns_One_Driver_and_One_Ride() { var boss = BossFake.Default(); var stewardess = StewardessFake.Default(); _terminal.AddPassengers(boss, stewardess); var result = _terminalService.MoveFromTerminal(); result.Count(x => x.IsDriver).Should().Be(1); result.Count.Should().Be(2); }
public void Should_take_a_passenger_to_plane_with_one_driver() { var boss = BossFake.Default(); var stewardess = StewardessFake.Default(); var passengers = new List <Person> { boss, stewardess }; _terminalService.MoveFromTerminal().Returns(passengers); _smartForTwoService.TakeToThePlane(); var airplanePassenger = _airplane.GetPassengers(); airplanePassenger.FirstOrDefault(x => x.GetType() == typeof(Stewardess)).Should().NotBeNull(); _airplane.HavePassengers().Should().BeTrue(); _smartForTwo.GetPassengers().Count().Should().Be(1); }
public void Should_finished_when_terminal_is_empty() { var boss = BossFake.Default(); var pillot = PilotFake.Default(); var officialOne = OfficialFake.Default(); var officialTwo = OfficialFake.Default(); var stewardessOne = StewardessFake.Default(); var stewardessTwo = StewardessFake.Default(); var cop = CopFake.Default(); var prisoner = PrisonerFake.Default(); _smartForTwo.AddPassenger(cop); _airplane.AddPassengers(boss, pillot, officialTwo, officialOne, stewardessOne, stewardessTwo, prisoner); var result = _airplaneService.AllPassengersOnThePlane(); result.Should().NotBeNullOrEmpty(); result.Should().Be("Ready to take flight!"); }