Any reference type or nullable value type can accept null.  So if
there was a different constructor with a nullable int, there would
still be a problem.

protected AbstractExample(int? optionalInt) { /* Do Stuff */ }

Or maybe a different data structure.

protected AbstractExample(IParameters parameters) { /* Do Stuff */ }

The issue is that for each of these constructors, null, is a valid
argument.  Sending null has unpredictable results, thus null must be
tested for each constructor.  In the example the expected outcome was
an ArgumentNullException was thrown.  The problem is that when there
are more than one constructors that may accept null, Rhino Mocks does
not know which constructor to use when null is sent as the argument.

On Apr 14, 9:54 am, "Jake" <[email protected]> wrote:
> Why not differentiate the constructor by using string.Empty?
>
>
>

-- 
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