Custom matchers
mock.Verify(p => p.DoSomething(It.Is<string>(s => s.Length > 100)));public static class ParameterExpectations
{
[Matcher]
public static string StringLongerThan(int size) => Moq.Match.Create<string>(s => s.Length > size);
}
mock.Verify(p => p.DoSomething(ParameterExpectations.StringLongerThan(100)));Last updated