How can I exlude the parameter constraints
Arg<DateTime>.Is.Equal(departureConstraint)
Arg<DateTime>.Is.Equal(arrivalConstraint)
from the assert below
mockBookingService.AssertWasCalled(
m =>
m.BookShuttle(Arg<DateTime>.Is.Equal(departure)
, Arg<DateTime>.Is.Equal(arrival)));
so that I can re-write it in a more friendly way like:
mockBookingService.AssertWasCalled(
m =>
m.BookShuttle(departureConstraint, arrivalConstraint));
There's a more succinct syntax you can use:
Arg.Is(departureConstraint)
mockBookingService.AssertWasCalled(m =>
m.BookShuttle(Arg.Is(departure), Arg.Is(arrivalConstraint)));
Or, since you have actual values for all of your parameters, You can just remove the parameter constraints altogether.
mockBookingService.AssertWasCalled(m =>
m.BookShuttle(departure, arrivalConstraint));