I just got a really nice patch for Rhino Mocks from Royston Shufflebotham, which include the following new constraints:
Is.Same() constraint, when you need to do reference equality and not just equality.
Property.ValueConstraint() which allows you to specify constraints on a property value, like this:Property.Value( "X", 5 ) & Property.ValueConstraint( "Y", Text.Contains( "foo" )&!Text.Contains("bar"))
The nice thing about it is that you can chain Propety.ValueConstraint() to check an object two level deep (or more, of course).
I would like to thank to Royston for the patch, it was very well done.
As usual, you can get the source and binaries here.