There's a few things to check:

1. "files" is an object (as defined by your code).  Why not use var
(to get the implicit string[])?
2. What's the signature of GetMailboxEntryIDs?
3. Is GetMailboxEntryIDs virtual?
4. Can you show the code where you create the mock?

---
Patrick Steele
http://weblogs.asp.net/psteele



On Fri, Feb 24, 2012 at 2:07 PM, Rob Hammond <[email protected]> wrote:
> Hi,
>
> Are COM objects / interfaces treated differently by Rhino Mocks when
> you set up expectations?  Here is a sample expectation I am setting
> up, note _mockDomain is a mocked COM object:
>
>   object files = new[] { "Core", "Device", "Xact", "SettingsFull",
> "Settings", "DataStore", "Sync", "Unknown" };
>   _mockDomain
>           .Stub(m => m.GetMailboxEntryIDs(Arg<string>.Is.Anything,
> Arg<tAHDMailboxType>.Is.Anything, Arg<bool>.Is.Anything))
>           .Return(files);
>
> When I get to the 'Act' portion of the test, Rhino Mocks returns an
> instance of ObjectProxy instead of the string[] 'files' I have defined
> in my test.
>
> Thanks,
>
> Rob Hammond
>
> --
> 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.
>

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