OK... Thanks Nils...  I think you are right.

I concluded yesterday that, since I am not interested in the expectations,
but am really just looking for a stub, I stopped calling
mockrepository.VerifyAll(), and *avoided* the problem.

Looking at it the other way around, I tried to code an expectation to cover
the violation (even though I was not interested in the expectation).  This
did not solve the problem!

Thanks for your response.



On Mon, Nov 29, 2010 at 9:28 PM, Nils Andresen <[email protected]>wrote:

> Hi.
> Sounds like something is subscribing to IEntityMonitor.DataCleared
> during your arrange..
>
> Some constructors maybe?
> I would search somewhere along
> > entityImageCache = new EntityImageCache(session, entityMonitorMock);
>
> Nils
>
> Am 29.11.2010 17:22, schrieb Virasana:
>  >
> > I have an interfac, IEntityMonitor, which defines, amongst other
> > things, a number of events.
> > I mock it and set it up as follows, and pass the mock to another
> > class.
> > The class does nothing to the mock.
> > However, when I run the code, I get the following error:
> >
> > *** IEntityMonitor.add_DataCleared(System.EventHandler); Expected #1,
> > Actual #0. ***
> >
> > Question: Why is the additinal, 'magical' expectation being set up?
> > Question : How do I remove the expectation?
>
>


-- 
Jean-Pierre Fouché
Software Developer
Mobile: +44-(0)79-0152-1927
Email: [email protected]

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