Answered on SO, but to summarise, I think you need to use custom argument constraints: http://ayende.com/wiki/Rhino%20Mocks%203.5.ashx#Complexexpressions http://ayende.com/wiki/Rhino%20Mocks%203.5.ashx#ConstraintsReference
Hope this helps, David On Sun, Oct 23, 2011 at 8:21 PM, mark Kharitonov <[email protected]>wrote: > I have the following code snippet: > > Action<IProbingErrorHandler> handlerAction = x => x.Post(sourceContext, > channelId, probingError); > var handler = MockRepository.GenerateStub<IProbingErrorHandler>(); > handler.Stub(handlerAction); > ... > handler.AssertWasCalled(handlerAction); > > Unfortunately, I had to implement the Equals method in the argument types > in order for the last assertion to work. Is there a way to use a custom > IEqualityComparer implementation instead? > > Thanks. > > P.S. > I have posted the same question on SO - > http://stackoverflow.com/questions/7861996/rhino-mocks-can-assertwascalled-use-a-custom-iequalitycomparer-when-comparing-t > > -- > You received this message because you are subscribed to the Google Groups > "Rhino.Mocks" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/rhinomocks/-/vAHF8ObHNJkJ. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rhinomocks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Rhino.Mocks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rhinomocks?hl=en.
