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 CreateCrew() { var boss = new Boss("Bob"); var sterwardessOne = new Stewardess("Jenna"); var sterwardessTwo = new Stewardess("Jessie"); var pilot = new Pilot("James"); var officialOne = new Official("Jhony"); var officialTwo = new Official("Jin"); var cop = new Cop("Dean"); var prisoner = new Prisoner("Sean"); _terminal.AddPassengers(boss, sterwardessOne, sterwardessTwo, pilot, officialOne, officialTwo, cop, prisoner); }