public void Should_throws_exception_when_try_to_disembark_passenger_if_smart_fortwo_is_null() { var place = new PlaceMock(); var exception = Assert.Throws <Exception>(() => place.DisembarkPassengerFromSmartFortwo()); Assert.Equal($"{place.GetType().Name} does not have a smart fortwo", exception.Message); }
public void Should_disembark_passenger_from_smart_fortwo_and_return_it() { var smartFortwo = new SmartFortwo(); var passenger = new Officer("passenger name"); smartFortwo.EnterPassenger(passenger); var place = new PlaceMock(); place.SetSmartFortwo(smartFortwo); var returnedCrewMember = place.DisembarkPassengerFromSmartFortwo(); Assert.Null(place.SmartFortwo.Passenger); Assert.Equal(passenger, returnedCrewMember); }