BackToRecord()

On Sat, Aug 29, 2009 at 7:50 PM, DHilgarth <[email protected]> wrote:

>
> Hi!
>
> I have the following problem:
>
> I am passing a mock object mock1 to the ctor of my SUT.
> In this ctor the SUT calls a method A on mock1.
>
> Then I raise an event on another mock object mock2 the SUT subscribed
> to.
> In response to that event, the SUT should call the method A of mock1
> again.
>
> using mock1.AssertWasCalled will succeed, but regardless of whether
> the SUT called method A in response to the event or not.
>
> Furthermore, the SUT should call A only if a certain condition is
> true. In the test that tests that A is NOT called if the condition is
> false, I have the call to mock1.AssertWasNotCalled. This will always
> fail, because of the call to A in the ctor of the SUT.
>
> I would have to strip mock1 of all its method calls after the ctor of
> the SUT ran... How can I do this?
>
> Kind regards,
>
> Daniel
>
> >
>

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