I'm having problems figuring out the proper arguments of the Arg option in RhinoMocks.
I am trying to mock the MSIRecordGetString method which has a ref Int32 parameter. Currently I have:
_Api.RecordGetString(Arg<IntPtr>.Is.Anything,
Arg<Int32>.Is.Anything,
Arg<StringBuilder>.Is.Anything,
ref Arg<Int32>.Ref( ???, 0).Dummy);
Can anyone let me know what ??? should/could be replaced with. I know it should be something of type AbstractConstraint but I'm not sure what is valid. Having difficulty finding any examples of proper usage.
Cheers.
I'm actually used to Moq, but my understanding of that first argument is a constraint, but seeing as you don't particularly care for the value (I'm assuming), could you do the following:
ref Arg<Int32>(Is.Anything(), 0).Dummy
?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With