Occasionally I write the same test against different mocking
frameworks, and the area of my particular interest at the moment is
internal errors.

So here's a recent finding. Try to mock a non-virtual method, below go
outputs from Moq, NMock2 and Rhino respectiely:

--------------------------------------------------------------
Moq:
System.ArgumentException : Invalid setup on a non-overridable member:
x => x.Foo(It.IsAny<Boo>())

NMock2:
System.ArgumentException : mock object hand has a method matching Foo,
but it is not virtual or abstract

Rhino Mocks:
System.InvalidOperationException : Invalid call, the last call has
been used or no call has been made (make sure that you are calling a
virtual (C#) / Overridable (VB) method).
--------------------------------------------------------------

So, questions:

- Which one looks more human friendly?
- What would be the best error message in this case for you?
- Are errors really important? (as one can get used to the current
ones)


[xposted to Moq and Rhino google groups]
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to