public void should_return_exception_if_driver_is_null_when_try_to_disembark_all() { var airplane = new Airplane(); var smartFortwo = new SmartFortwo(); var exception = Assert.Throws <Exception>(() => smartFortwo.DisembarkAll()); Assert.Equal("There is no driver in the smart fortwo", exception.Message); }
public void should_return_exception_if_passenger_is_null_when_try_to_disembark_all() { var driver = new Pilot("pilot"); var smartFortwo = new SmartFortwo(); smartFortwo.EnterDriver(driver); var exception = Assert.Throws <Exception>(() => smartFortwo.DisembarkAll()); Assert.Equal("There is no passenger in the smart fortwo", exception.Message); }
public void should_disembark_all_crew_members_from_the_smart_fortwo() { var driver = new Pilot("pilot"); var passenger = new Officer("officer"); var smartFortwo = new SmartFortwo(); smartFortwo.EnterBoth(driver, passenger); var crewMembersReturned = smartFortwo.DisembarkAll(); Assert.Null(smartFortwo.Driver); Assert.Null(smartFortwo.Passenger); Assert.Equal(2, crewMembersReturned.Count()); Assert.Contains(driver, crewMembersReturned); Assert.Contains(passenger, crewMembersReturned); }