Hi,

I have some kind of 'global test setup' method. One of the things it
does is this:
            Mocks = new MockRepository();
            NuntioFactory = Mocks.Stub<INuntioFactory>();
            ...
            DataProvider = Mocks.PartialMock<XmlDataProvider>();
            ...
            ...
            SetupResult.For(NuntioFactory.DataProvider).Return
(DataProvider);

Then in the actual test method I have:
            IListReader queryListReader =
Mocks.PartialMock<XmlQueryListReader>(NuntioFactory);
            SetupResult.For(queryListReader.GetDataCount(null)).Return
(2).IgnoreArguments();
            ...
            ...
            SetupResult.For(DataProvider.GetOwnerID(null)).Return
(111).IgnoreArguments();

The test throws an exception on the line where I try to setup a result
for the GetOwnerID method call.

What I don't understand is the following: Why am I able to create a
partial mock of my XmlQueryListReader and setup a result for a method
without having the method being actually executed. And why am I not
able to do that for my XmlDataProvider mock?

I must be missing something? As far as I see it (probably not far
enough ;)) I'm using 2 times the same principle. One time it does what
I expect it to do and one time it doesn't.
Could someone please point me in the good direction?

Thank you...
Manu aka TweeZz.

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