You can do the following:
Expect.Call(() => m_Service.UpdateTrade( Arg<Trade>.Matches(t => t.Delivery.Equals(new DateTime(2013, 7, 3))), Arg<Token>.Is.Anything) );
Also note that if you are not going to check the token parameter in these tests, you can use the Is.Anything constraint for it.
Note:
RhinoMocks 3.5 and .NET4 + raise an AmbiguousMatchException when using the Matches(Expression<Predicate<..>>) overload Matches(Expression<Predicate<..>>) . If it is impossible to upgrade to RhinoMocks 3.6 (for reasons), you can still use the Matches(AbstractConstraint) overload Matches(AbstractConstraint) as follows:
Arg<Trade>.Matches( Property.Value("Delivery", new DateTime(2013, 7, 3)))
or
Arg<Trade>.Matches( new PredicateConstraint<DateTime>( t => t.Delivery.Equals(new DateTime(2013, 7, 3))))
source share