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);
        }
Exemplo n.º 2
0
        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!");
        }