Is there anyway to mock an method that takes a dynamic parameter?
I want to set an expectation like this:
_hasher.Expect(h => h.ComputeHash(Arg<dynamic>.Matches(o=> o.PropertyA == "123"))).Return("some hash");
I get error: An expression tree may not contain a dynamic expression. I can certainly do something like:
_hasher.Expect(h => h.ComputeHash(Arg<object>.Is.Anything)).Return("some hash");
But I feel like this is leaving a gap in my test. Is there any other alternative to mock a dependency that has a method that accepts a dynamic parameter?