Пример #1
0
        public void DisembarkDriver(Place currentPlace, Place destinyPlace)
        {
            if (!CurrentPlaceHasSmartFortwo(currentPlace))
            {
                throw new Exception("The smart fortwo was not found!");
            }

            var driver = currentPlace.DisembarkDriverFromSmartFortwo();

            currentPlace.Board(driver);

            _tripInformerService.ShowDisembarkingInfo(new List <CrewMember> {
                driver
            });

            _tripInformerService.ShowTripStateInfo(currentPlace, destinyPlace);
        }
Пример #2
0
        public void Show_should_disembarking_info()
        {
            var crewMembers = new List <CrewMember>
            {
                new Pilot("Pilot"),
                null,
                new Officer("Officer")
            };

            var output = new StringWriter();

            Console.SetOut(output);

            _service.ShowDisembarkingInfo(crewMembers);

            var expectedOutput = "Disembarking (Pilot: Pilot, , Officer: Officer)\n\r\n";

            Assert.Equal(expectedOutput, output.ToString());
        }