public void should_return_exception_when_try_to_disembark_a_passenger_that_is_null() { var smartFortwo = new SmartFortwo(); var exception = Assert.Throws <Exception>(() => smartFortwo.DisembarkPassenger()); Assert.Equal("There is no passenger in the smart fortwo", exception.Message); }
public void should_disembark_passenger_from_the_smart_fortwo() { var passenger = new Pilot("pilot"); var smartFortwo = new SmartFortwo(); smartFortwo.EnterPassenger(passenger); var destinyPlace = new Airplane(); destinyPlace.SetSmartFortwo(smartFortwo); var returnedPassenger = smartFortwo.DisembarkPassenger(); Assert.Null(smartFortwo.Driver); Assert.Equal(passenger, returnedPassenger); }