Ejemplo n.º 1
0
        public void PutPassengerInSmartFortwo(CrewMember passenger)
        {
            if (SmartFortwo.IsNull())
            {
                throw new Exception(_nullSmartFortwoException);
            }

            SmartFortwo.EnterPassenger(passenger);
        }
Ejemplo n.º 2
0
        public void PutDriverInSmartFortwo(CrewMember driver)
        {
            if (SmartFortwo.IsNull())
            {
                throw new Exception(_nullSmartFortwoException);
            }

            SmartFortwo.EnterDriver(driver);
        }
Ejemplo n.º 3
0
        public void PutBothInSmartFortwo(CrewMember driver, CrewMember passenger)
        {
            if (SmartFortwo.IsNull())
            {
                throw new Exception(_nullSmartFortwoException);
            }

            SmartFortwo.EnterDriver(driver);
            SmartFortwo.EnterPassenger(passenger);
        }
Ejemplo n.º 4
0
 public IEnumerable <CrewMember> DisembarkAllFromSmartFortwo()
 => SmartFortwo?.DisembarkAll()
 ?? throw new Exception(_nullSmartFortwoException);
Ejemplo n.º 5
0
 public CrewMember DisembarkDriverFromSmartFortwo()
 => SmartFortwo?.DisembarkDriver()
 ?? throw new Exception(_nullSmartFortwoException);
Ejemplo n.º 6
0
 public List <CrewMember> GetSmartFortwoCrewMembers()
 => SmartFortwo?.GetCrewMembers()
 ?? throw new Exception(_nullSmartFortwoException);
Ejemplo n.º 7
0
 public void SetSmartFortwo(SmartFortwo smartFortwo)
 => SmartFortwo = smartFortwo;